This file describes the usage of zsplit.

Please notice in order to access devices or files your 
should have read/write rights.

Zsplit

zsplit - will read big devices or files and make compressed
splitted image chunks of it.

usage: zsplit [OPTIONS] SOURCE

zsplit can read from SOURCE, which can be an input device,
-stdin or -file, compress and split the output image 
file into chunks of specified size. These chunks could be 
saved on any medium for later restoring to its origin 
with a help of unzsplit.

zsplit returns 0 if during the operation no error was 
detected, otherwise -1. 

SOURCE: can be a file (example: /path_to_file/file), 
device (example: /dev/hda), partition (example: /dev/hda1) 
or stdin (-).

OPTIONS:

-b, --buffer SIZE: Setup read/write buffer SIZE (in kibibytes) 
to optimize read/write speed. Example of SIZE: 2 (2048 bytes).
If this option is not used, the default size is 8 (8192 bytes).

-c, --stdout: Write output to stdout (standard output).

-d, --debug: The debug information will be written into the
debug.log file in the current directory. 
If this option is not used, the debug information 
will be printed to stderr.

-i, --indir DIR: Input directory (DIR is directory which 
containes the SOURCE).

-N, --outname OUT_NAME: This is the common part of 
file name used for all the split up files if this 
option is not specified then the input-file's name 
is used to create this common part. If input-file 
name could not be used (example: stdin) then the 
default OUT_NAME will be created based on current 
date and creation time.

-h, --help: Shows this message.

-o, --outdir DIR: Output directory (DIR is directory 
which containes the output files).

-r, --noerror: If during the read operation I/O error 
happens, safely ignore these errors and read farther.

-s, --endsize SIZE: Split the file into chunks of this 
size SIZE. Example of SIZE: 
1000s (1000 sectors [1s=512 bytes]), 
10k (10 KiB), 100M (100 MiB) or 50G (50 GiB). 
If this option is not used the output file will not 
be splitted.

-?, --usage: Shows short usage information.

-v, --version: Prints out a current version number.

-#, --fast (or --best): Regulate the speed of compression 
using the specified digit #, where 0 indicates 
no compression, 1 indicates the fastest (--fast) 
compression method (less compression) and 9 indicates 
the slowest (--best) compression method. 
The default compression level is 6.

EXAMPLES:

zsplit -s 4.5G -N WinXP_bkp -d /dev/hda

zsplit reads device /dev/hda, compresses using default compression 
method, splits up the chunks of size 4.5 gibibyte (GiB), 
saves these chunks using common name part WinXP_bkp as: 
WinXP_bkp_0.spl.zp, WinXP_bkp_1.spl.zp ..., and writes 
the debug information to the debug.log file in the 
current directory.

zsplit -s 100M -N test_img -o /home/user -d - 

zsplit reads from stdin, compresses using default compression 
method, splits up the chunks of size 100 mebibyte (MiB), 
saves these chunks using common name part test_img as: 
test_img_0.spl.zp, test_img_1.spl.zp ... into the 
directory /home/user, and writes the debug information 
to the debug.log file in the current directory.

zsplit -N test_bkp /dev/hda 

zsplit reads device /dev/hda, 
compresses using default compression method, 
saves the output file as test_bkp_0.spl.zp in the 
current directory and writes the debug information to 
stderr.

