Documentation
¶
Overview ¶
Package gnugzip is a pure-Go port of GNU gzip's compressor, producing the raw deflate streams that the gzip program writes.
The port (deflate.go, trees.go, bits.go) is derived from GNU gzip 1.14 and is licensed under the GNU General Public License version 3 or later; see COPYING in this directory. Its output is byte for byte what gzip 1.14 produces when reading a regular file, which differs from zlib's at most levels because gzip decides where to end a deflate block with its own heuristic and never emits a stored file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct{}
Engine produces raw deflate streams the way GNU gzip does.
func (*Engine) Candidates ¶
func (*Engine) Candidates(h *format.GzipHeader, _ int64) [][]engine.DeflateParams
Candidates returns two tiers: levels 1..9 ordered by the XFL hint, then the same levels with --rsyncable. GNU gzip has no level 0.
func (*Engine) NewWriter ¶
func (*Engine) NewWriter(w io.Writer, p engine.DeflateParams) (io.WriteCloser, error)
NewWriter returns a writer that compresses into w. Close flushes.