Documentation
¶
Overview ¶
Package gzip implements the `gzip`, `gunzip`, and `zcat` built-ins. All three share a single implementation parameterized by the default mode (compress, decompress, decompress-to-stdout).
Flags:
-d decompress (gzip only; gunzip implies it) -k keep input file (do not unlink) -c write output to stdout instead of <name>.gz / <name> -N use original filename stored in the gzip header -r recurse into directories -l list contents (compressed size, uncompressed size, ratio, name) -1..-9 compression level (compress only) --help show this help and exit 0
All file I/O routes through Context.FS; stdin via Context.Stdin; stdout via Context.Stdout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mode ¶
type Mode int
Mode selects the default behavior for a gzip-family invocation.
const ( // ModeCompress — `gzip`. Default: compress each named file in // place, writing <name>.gz. With -d it decompresses. ModeCompress Mode = iota // ModeDecompress — `gunzip`. Default: decompress each named .gz // file, writing the trimmed name. ModeDecompress // ModeZcat — `zcat`. Equivalent to `gunzip -c`: decompress to // stdout, never touch the original. ModeZcat )
Click to show internal directories.
Click to hide internal directories.