Repository navigation
Command Line
zipir compress [--format gzip|zlib|deflate|bgzf] [--binary] [--fast|--even|--dense] [--] [FILE|-]
zipir decompress [--format auto|gzip|zlib|deflate] [--max-output-bytes N] [--] [FILE|-]
zipir test [--format auto|gzip|zlib|deflate] [--max-output-bytes N] [--] [FILE|-]
zipir bgzf index [--] FILE
zipir tar list|test [--format auto|gzip|zlib|bgzf|none] [--] [FILE|-]
zipir tar create [--format gzip|zlib|bgzf|none] [--fast|--even|--dense] [--] PATH...
zipir --version
zipir --help
FILE defaults to standard input, and - names it explicitly. Output goes to standard output. Input files are never changed.
Writes one gzip member at the even preset unless options say otherwise.
-
--formatchoosesgzip,zlib,deflate(raw DEFLATE, no header or check), orbgzf. -
--fast,--even, and--densechoose the preset.--level 1,--level 5, and--level 9are accepted as their older spellings. -
--binarycuts BGZF blocks at full size; with any other format it is a usage error. Without it, BGZF blocks end at text lines, asbgzip's do, unless the input contains a NUL byte.
The same input and preset give the same bytes on every CPU and build of one version; a later version may write different bytes that decode to the same input.
decompress writes the decoded bytes; test checks the whole stream and discards them.
-
--format auto(the default) detects gzip by its magic bytes, BGZF by its first member'sBCsubfield, and zlib by a valid two-byte header. Raw DEFLATE has no signature and needs--format deflate.--format gzipreads BGZF as ordinary gzip. - Concatenated gzip members decode as one stream.
-
--max-output-bytes Nfails once the decoded output would passNbytes. - BGZF input without its 28-byte EOF marker is a warning for
decompressand an error fortest.
Output can be partial when decoding fails part way; check the exit status.
zipir bgzf index FILE writes FILE.gzi, the index bgzip -r writes: one entry per block that holds data, except the first. It refuses to replace an existing .gzi.
-
tar listprints one line per entry: mode, size, time in UTC, and name, as GNUtar -tv --full-timedoes without the owner column. -
tar testchecks every header and the end-of-archive blocks and prints nothing. - For both,
--format autoalso detects a plain archive (none). An archive without its end blocks is a warning forlistand an error fortest. -
tar createarchives eachPATHand, for directories, their contents in byte order of names. Paths must be relative and must not contain... Symlinks are stored as links, never followed; hardlinked files are stored whole. Every entry gets owner 0 and time 0, so the same tree gives the same archive. Other file types are skipped with a warning.
zipir does not extract archives.
-
0: success, including the warnings above. -
1: the input is corrupt, truncated, or has trailing data, or a file could not be read or written. Standard error names the reason, for examplezipir: CrcMismatch. -
2: the arguments are wrong, or--format autocould not recognize the input.
Repository | Home | Getting started | API reference | Benchmarks | Changelog | MIT License
zipir wiki
Use zipir
Reference
Development