For a compression library for Go projects, the first results are klauspost/compress (This library provides high-performance, multi-format compression implementations with a focus on parallel processing and allocation-free decoding, making it a comprehensive tool for data compression tasks in Go), golang/snappy (This library provides a high-performance implementation of the Snappy compression format specifically for Go, offering the streaming interfaces and standard library compatibility required for efficient data processing) and google/brotli (This is a Brotli implementation library, but it is written in TypeScript rather than Go, making it unsuitable for a developer specifically seeking high-performance Go compression tools). gobwas/ws and lz4/lz4 round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best go compression libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
This is a high-performance Go compression library providing implementations of Zstandard, Snappy, and Huffman coding. It includes a parallel compression framework for distributing gzip and stream workloads across multiple CPU cores and a specialized Huffman codec optimized for modern CPU architectures. The library features a Zstandard implementation that supports custom dictionaries and allocation-free decoding, alongside a Snappy compatible encoder for high-throughput data processing. It provides specific tools for dictionary generation and optimization to improve compression ratios for smal
This library provides high-performance, multi-format compression implementations with a focus on parallel processing and allocation-free decoding, making it a comprehensive tool for data compression tasks in Go.
The Snappy compression format in the Go programming language.
This library provides a high-performance implementation of the Snappy compression format specifically for Go, offering the streaming interfaces and standard library compatibility required for efficient data processing.
Brotli is a lossless data compression library and engine that uses dictionary coding and frequency analysis to reduce file sizes. It provides tools for shrinking data streams and files while ensuring every bit of original information is preserved for perfect restoration. The project focuses on optimizing web content and network bandwidth by reducing the size of HTML, CSS, and JavaScript files. It is designed for integration into web servers and browsers to improve the efficiency of data transmission. The library includes capabilities for both compressing and decompressing data streams. It al
This is a Brotli implementation library, but it is written in TypeScript rather than Go, making it unsuitable for a developer specifically seeking high-performance Go compression tools.
This Go library provides low-level components for implementing high-performance WebSocket connections. It focuses on minimal memory allocations and efficient data throughput via a dedicated frame processor, an HTTP connection upgrader, and a compression layer. The project distinguishes itself through the use of zero-allocation buffer reuse to reduce garbage collection pressure. It operates directly on raw network bytes for frame parsing and manages the lifecycle of connections through state-based tracking. The library covers core network protocol capabilities including the transformation of
This library is a specialized tool for high-performance WebSocket connections rather than a general-purpose data compression library, though it does include a compression layer for its specific protocol implementation.
This project provides a lossless compression algorithm and a byte-oriented compression library designed for high-speed data reduction and maximum decompression speed. It functions as a stream-oriented compression engine, a software library for encoding and decoding data blocks, and a command-line tool for managing interoperable compressed frames. The system distinguishes itself through the use of predefined pattern dictionaries to improve compression ratios for small data sets and small packets. It supports multiple processing modes, including high-speed block compression for minimal latency
This is a C-based implementation of the LZ4 algorithm, which serves as a low-level building block for compression rather than a native Go library for your specific development environment.
Fasthttp is a high-performance networking framework for Go, designed to maximize throughput and minimize memory overhead in demanding web applications. It functions as a specialized HTTP server and client library that prioritizes efficient resource management, allowing developers to build scalable services capable of handling massive concurrent traffic with minimal garbage collection pressure. The library distinguishes itself through a focus on zero-allocation processing and low-level optimization. It achieves this by recycling temporary request and response objects through managed pools and
This is a high-performance HTTP networking framework rather than a general-purpose data compression library, though it utilizes efficient memory management techniques that are often relevant to high-performance Go development.
Zstandard is a lossless data compression library and archive format designed for high compression ratios and fast real-time processing. It functions as a real-time data compressor and multi-threaded compression engine capable of distributing workloads across multiple CPU cores to increase throughput. The system features a dictionary-based compressor that trains on sample data to improve the compression ratio and speed of small files. It also provides long distance pattern matching to identify repeated sequences across large files. The library covers a broad range of capabilities including st
This is a high-performance C library for Zstandard compression, which serves as a building block for Go projects but is not a native Go implementation or library itself.
Snappy is a high-performance lossless compression library implemented in C++. It provides data reduction methods that perfectly restore original information, focusing on system-level efficiency and processing velocity across different platforms. The library prioritizes high-speed data compression and decompression over achieving the maximum possible compression ratio. It is designed for real-time stream compression to reduce bandwidth usage without introducing significant processing latency. The implementation covers high-velocity data shrinking and rapid restoration. It includes resilient d
This is a C++ implementation of the Snappy compression algorithm, which does not meet the requirement for a Go-native library despite its high-performance characteristics.
Arrow is a cross-language development platform for in-memory data. It provides a standardized, language-independent columnar memory format designed to accelerate analytical operations and improve memory efficiency on modern computing hardware. By utilizing a schema-driven approach, the framework enables the efficient organization of both flat and nested data structures. The project functions as an analytical data processing engine that facilitates high-performance computation directly on memory-resident datasets. It distinguishes itself through a zero-copy architecture, which allows multiple
This is a cross-language columnar memory format and analytical processing framework rather than a library specifically designed for general-purpose data compression and decompression.
zlib is a lossless data compression library that implements the deflate compression algorithm, combining LZ77 sliding window and Huffman coding. It provides the core compression and decompression engines, along with support for gzip, zlib, and raw deflate stream formats, enabling data to be compressed and restored without any loss of information. The library offers a range of capabilities for handling compressed data, including single-call memory and file operations, as well as incremental stream-based processing for working with data larger than available memory. It includes mechanisms for a
This is a C library rather than a native Go implementation, meaning it would require cgo bindings to be used within a Go project.
Netpoll is an event-driven network framework and non-blocking I/O library designed to manage concurrent TCP and Unix domain socket connections. It utilizes a non-blocking event loop to monitor file descriptors and trigger callbacks for read and write events, serving as a high-performance socket manager and TCP network poller. The framework optimizes throughput across CPU cores by distributing incoming network connections across multiple pollers. It implements zero-copy networking primitives, using linked buffers and specialized memory management to read and write data while minimizing memory
This is a high-performance network I/O and socket management framework, not a data compression library, though it shares a focus on memory efficiency and zero-copy operations.
This project is a memory-safe implementation of the QUIC transport protocol and HTTP/3, designed for high-throughput and efficient network communication. It provides a comprehensive toolkit for building secure, low-latency network applications by managing the full lifecycle of transport connections, including protocol negotiation, stream data exchange, and connection state management. The library distinguishes itself through a focus on performance and protocol integrity. It utilizes a formal state machine to enforce strict adherence to transport rules and employs zero-copy buffer management t
This is a network protocol implementation for QUIC and HTTP/3 rather than a general-purpose data compression library, making it a building block for network communication instead of the requested tool.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| klauspost/compress | 5.5K | Go | NOASSERTION | |
| golang/snappy | 1.6K | Go | BSD-3-Clause | |
| google/brotli |
| 14.8K |
| TypeScript |
| MIT |
| gobwas/ws | 6.5K | Go | MIT |
| lz4/lz4 | 11.9K | C | NOASSERTION |
| valyala/fasthttp | 23.3K | Go | mit |
| facebook/zstd | 27.3K | C | NOASSERTION |
| google/snappy | 6.6K | C++ | NOASSERTION |
| apache/arrow | 16.5K | C++ | apache-2.0 |
| madler/zlib | 6.7K | C | other |