| Crates.io | no_inflate |
| lib.rs | no_inflate |
| version | 0.1.1 |
| created_at | 2025-11-28 22:26:30.672452+00 |
| updated_at | 2025-11-29 03:39:17.645191+00 |
| description | A minimal no_std Rust library implementing zlib inflate (DEFLATE) algorithm in pure Rust using alloc for dynamic output buffer. |
| homepage | https://github.com/kpishere/no_inflate |
| repository | https://github.com/kpishere/no_inflate |
| max_upload_size | |
| id | 1956130 |
| size | 50,803 |
[An AI generated library that is human verified.]
A minimal no_std Rust library implementing zlib inflate (DEFLATE) algorithm in pure Rust using alloc for dynamic output buffer.
This crate provides a no_std-compatible inflate implementation that reads compressed zlib input from a static byte slice and returns a dynamically allocated Vec<u8> as output.
Key features:
alloc for dynamic buffers)BEFORE USING: Sorry, there is issue with how this lib is done and using 'cargo publish' feature. Before using as no_std library, edit the file srd/lib.rs and uncomment the 3rd line. (Publish operation appears to run a test but the test isn't including stdlib.)
//#![cfg_attr(not(test), no_std)]
Usage:
use no_inflate::inflate_zlib;
let compressed: &[u8] = /* zlib compressed bytes */;
let decompressed = inflate_zlib(compressed).expect("decompress");
// `decompressed` is a Vec<u8>
Run tests (requires a standard Rust toolchain):
cargo test --lib test
Limitations:
Note about allocators:
The library is written as no_std and uses alloc for dynamic buffer allocation. When using this crate in no_std environments, ensure a global allocator is provided by your runtime or by selecting an allocator crate (for example linked_list_allocator or wee_alloc) and registering it as the #[global_allocator] in your platform.
Contributions welcome.