About this project

compress is a Go module collecting optimized compression and decompression implementations. It is installed with `go get github.com/klauspost/compress@latest` and supports the current Go release plus two prior versions. Build tags `nounsafe` and `noasm` let users disable use of the unsafe package or assembly code respectively. Included packages: - zstd: Zstandard compression and decompression implemented in pure Go, with concurrent stream encoding, dictionaries, delta encoding, frame header handling, and assembly paths for amd64 and arm64. - s2: Described as a high-performance replacement for Snappy, with concurrent streams, dictionaries, size estimation, custom stream encoders, and converters for LZ4 and Intel LZ4s blocks. - flate: Optimized deflate implementation usable as a drop-in replacement for gzip, zip and zlib, with tunable levels, dictionary support, limited-window compression, and inflate checkpoints. - snappy: Drop-in replacement for github.com/golang/snappy, offering different compression behavior and concurrent streams. - lzw: Drop-in replacement for compress/lzw, with faster compression and decompression depending on data. - huff0 and fse: Raw entropy encoding implementations (Huffman and FSE). - xpress: Decompression of Microsoft XPRESS (MS-XCA) plain LZ77 and LZ77+Huffman formats, the latter used in WIM images and Windows Compact OS/WOF data. - gzhttp: Client and server wrappers for handling gzipped and zstd HTTP requests, including content negotiation, ETag handling, and optional BREACH mitigation. - pgzip: A separate package providing a parallel gzip implementation. The README also documents an extensive changelog covering releases from v1.15.x through v1.20.1, listing bug fixes, security fixes, performance work, and new features such as arm64 assembly, dictionary builders, and zstd concurrent stream encoding. The project is written in Go and is intended for developers embedding compression into Go applications or services.