← All notes

Go compress/flate: the DEFLATE compressed data format

Answer: Package flate implements the DEFLATE compressed data format.

Compression levels

The format is described in RFC 1951.

BestSpeed is 1.

BestCompression is 9.

DefaultCompression is -1.

HuffmanOnly disables Lempel-Ziv match searching.

It only performs Huffman entropy encoding.

A preset dictionary can be used to improve the compression ratio.

Related packages

The compress/gzip and compress/zlib packages implement access to DEFLATE-based file formats.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go, compress/flate package reference; Go, compress/flate source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Go, compress/flate package reference; Go, compress/flate source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.

Cite this

Permanent ID: iil:note:84q55yxm

iinventedlight. 2026. "Go compress/flate: the DEFLATE compressed data format." iinventedlight Library, iil:note:84q55yxm, version of 2026-11-24. https://iinventedlight.com/library/notes/go-compress-flate/. License: CC-BY-4.0.

@misc{iil_note_84q55yxm,
  author = {{iinventedlight}},
  title = {{Go compress/flate: the DEFLATE compressed data format}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-24},
  url = {https://iinventedlight.com/library/notes/go-compress-flate/},
  note = {Permanent ID iil:note:84q55yxm. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-compress-flate.md.