Expand description
crush-parallel — Parallel DEFLATE compression engine
Implements a pigz-inspired multi-threaded compression engine using a custom binary format (CRSH) optimised for parallel decompression and random block access.
§Quick Start
use crush_parallel::{compress, decompress, EngineConfiguration};
let config = EngineConfiguration::default();
let data = b"hello world".repeat(10000);
let compressed = compress(&data, &config).expect("compression failed");
let recovered = decompress(&compressed, &config).expect("decompression failed");
assert_eq!(data.as_slice(), recovered.as_slice());Re-exports§
pub use config::EngineConfiguration;pub use config::EngineConfigurationBuilder;pub use config::ProgressCallback;pub use config::ProgressEvent;pub use config::ProgressPhase;pub use engine::compress;pub use engine::compress_file;pub use engine::compress_stream;pub use engine::compress_to_writer;pub use engine::decompress;pub use engine::decompress_from_reader;pub use format::BlockIndexEntry;pub use index::decompress_block;pub use index::load_index;pub use index::BlockIndex;
Modules§
- block
- Per-block compression and decompression helpers.
- config
- Engine configuration and progress reporting types.
- engine
- Main compression and decompression entry points.
- format
- CRSH binary file format serialization/deserialization.
- index
- Block index loading and random-access decompression.
Constants§
- PLUGIN_
MAGIC - Magic number for the parallel-deflate plugin in the crush-core outer format.