For a rust library for data compression, the first results are google/brotli (This library provides a robust implementation of the Brotli compression algorithm, though it is primarily a TypeScript-based project rather than a native Rust library, meaning it lacks the requested Rust-specific bindings or no-std support), tokio-rs/prost (This is a Protocol Buffers serialization and code generation framework rather than a general-purpose data compression library, though it does handle binary data encoding) and google/highway (This is a SIMD hardware abstraction library used to build high-performance software, but it does not provide data compression algorithms or the streaming APIs required for a compression library). rust-bakery/nom 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 rust compression libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
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 library provides a robust implementation of the Brotli compression algorithm, though it is primarily a TypeScript-based project rather than a native Rust library, meaning it lacks the requested Rust-specific bindings or no-std support.
Prost is a Protocol Buffers implementation for Rust that functions as a binary serialization framework and code generator. It translates schema definitions into idiomatic Rust structs and enums, providing the logic necessary to encode and decode structured data into the Protocol Buffers binary format. The project distinguishes itself through a no-std implementation, allowing it to operate in embedded or kernel environments that lack a standard library. It also serves as a schema introspector by emitting file descriptor sets, which enables the programmatic analysis of original schema definitio
This is a Protocol Buffers serialization and code generation framework rather than a general-purpose data compression library, though it does handle binary data encoding.
Highway is a portable C++ library and hardware abstraction layer designed for writing single instruction multiple data (SIMD) code. It provides a unified interface that maps data-parallel logic to various CPU instruction sets, enabling the development of high-performance software that runs across different processor architectures without requiring architecture-specific assembly. The project features a dynamic instruction dispatcher that selects the most efficient CPU instruction set at runtime based on detected hardware. It also supports static target specialization and extensible mechanisms
This is a SIMD hardware abstraction library used to build high-performance software, but it does not provide data compression algorithms or the streaming APIs required for a compression library.
nom is a parser combinator framework for Rust used to build complex parsers by combining small, reusable parsing functions. It functions as a zero-copy parsing tool that minimizes memory overhead by returning slices of the original input instead of allocating new memory. The framework is designed for diverse data formats, serving as a binary data parser with configurable endianness and a bitstream processing library capable of extracting values of arbitrary bit length. It also functions as a streaming data parser that can process data arriving in chunks and signal when additional input is req
This is a parser combinator framework for building data parsers rather than a library for data compression algorithms, making it a tool for a different stage of the data processing pipeline.
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 high-performance C library for the LZ4 algorithm rather than a native Rust compression library, meaning it would require external bindings to be used in a Rust project.
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 Rust implementation, and while it provides the core compression functionality, it lacks the specific Rust-idiomatic features like zero-copy deserialization and no-std compatibility requested.
msgspec is a high-performance data modeling, serialization, and schema validation toolkit for Python. It serves as a type-safe serialization framework that integrates schema enforcement and data parsing into a single pass, functioning as both a data serialization library and a schema validation system based on standard Python type annotations. The project distinguishes itself through high-performance structural primitives, including compilation-based routine generation and zero-copy buffer parsing. It optimizes memory usage via garbage collection-aware layouts and reduces processing overhead
This is a Python-based serialization and schema validation toolkit rather than a Rust-native compression library, making it a tool for data modeling rather than the low-level compression primitives requested.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| google/brotli | 14.8K | TypeScript | MIT | |
| tokio-rs/prost | 4.7K | Rust | Apache-2.0 | |
| google/highway |
| 5.6K |
| C++ |
| NOASSERTION |
| rust-bakery/nom | 10.4K | Rust | MIT |
| lz4/lz4 | 11.9K | C | NOASSERTION |
| madler/zlib | 6.7K | C | other |
| msgspec/msgspec | 3.8K | Python | BSD-3-Clause |