Skip to main content

Crate flashkit_compression

Crate flashkit_compression 

Expand description

Decompression of blocks into caller buffers, for flash filesystems.

Decompressors decompresses whole blocks, such as the blocks of a squashfs or UBIFS image. The caller enables each Algorithm at runtime. A feature only adds the method that enables an algorithm, so enabling a feature alone doesn’t change which input is accepted. Without the zstd feature, the crate works without std and an allocator.

use flashkit_compression::{Algorithm, Decompressors};

let mut decompressors = Decompressors::new();
decompressors.enable_lz4();
let mut out = [0; 16];
let len = decompressors.decompress(Algorithm::Lz4, b"\x50hello", &mut out)?;
assert_eq!(&out[..len], b"hello");

§Features

Modules§

algorithm 🔒
decompressors 🔒

Structs§

Decompressors
Algorithms that the caller allows, with their working memory.

Enums§

Algorithm
Compression algorithm and format of a block.
DecompressError
Failure to decompress a block.