GZTOOL(1)

NAME
gztool - gzip-compressed file indexer

SYNOPSIS
gztool [-[abLnsv] <num>] [-cCdDeEfFhilStTwWxX|u[cCdD]] [-I <index>] <file> ...

DESCRIPTION
gztool creates small indexes for files compressed with gzip(1), enabling quick random access. It builds upon this to provide a number of features.

OPTIONS
The following options are recognised:

-a <seconds>
    Await seconds between reads with -[ST]|Ec. Defaults to 4 seconds.

-b <offset>
    Extract data from offset, taken as an uncompressed byte offset in the file, to standard output. This creates or reuses index files as necessary. '0' and '0x' prefixes can be used, and 'kmgtpe' or 'KMGTPE' suffixes (powers of ten and of two respectively).

-C  Always create a complete index file, ignoring possible errors.

-c  Compress a file (equivalent to gzip -c), creating an index at the same time.

-d  Decompress a file (equivalent to gzip -d).

-D  Do not delete the original file when compressing or decompressing.

-e  If multiple files are specified, continue on error (if any).

-E  End processing on first gzip end-of-file marker at EOF. (Has no effect if combined with -e).

-f  Force overwriting if the destination file already exists.

-F  Force index creation/completion before the requested action. The default is to interleave index creation.

-h  Print a brief help message.

-hh Print a complete usage guide.

-i  Create an index for the given compressed file. This is the default action.

-I <index>
    Use an index file named index.

-l  Check and list the information contained in the given index file. Can be repeated (-lland-lll) to increase the level of detail.

-L <line>
    Extract data from the given line, taken as a line number in the uncompressed data. This creates or reuses index files as necessary. '0' and '0x' prefixes can be used.

-n <offset>
    Indicates that the first byte on compressed input is offset, not 1; this allows truncated compressed inputs to be used, as long as an index exists for the complete input.

-s <span>
    Specifies the span in uncompressed mebibytes between index points when creating the index. Default is 10.

-S  Supervise the given file: create a growing index, for a still-growing compressed file (-i is implicit).

-t  Extract the last bytes to standard out.

-T  Extract the last bytes to standard out, from a still-growing compressed file, and continue supervising and extracting to standard out.

-u [cCdD]
    Utility to compress (-u c) or decompress (-u d) zlib-format files to standard output. Use the uppercase variants for raw compressed files. No index is used.

-v <verbosity>
    Set the output verbosity, from 0 (none) to 5 (nuts). Default is 1.

-w  Wait for file creation if it doesn't exist, when using -[cdST].

-W  Do not write the index to disk. If one is already available, it will be read and used. Useful if the index is still being created from a -S run.

-x  Create an index with line number information (compatible with Unix and Windows line-endings). The index counts the last line even if it doesn't end with a newline.

-X  Like -x, but the newline character is \r (old Mac OS).

SEE ALSO
gzip(1).

AUTHORS
gztool was written by Roberto S. Galende. This manual page was adapted from the provided documentation by Stephen Kitt <skitt@debian.org>, for the Debian GNU/Linux system (but may be used by others). It was last modified for gztool version 0.11.2.