Registry / utility / rust-lzma

rust-lzma

JSON →
library0.6.0rscratesunverified

Simple interface for LZMA compression and decompression in Rust.

# Cargo.toml [dependencies] rust-lzma = "0.6.0"
INSTALL
IMPORT
SIG · RUST-LZMA
R
rust-lzma
utilityrustv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

XzDecoder
use rust_lzma::read::XzDecoder;

Decompress LZMA data using XzDecoder.

use rust_lzma::read::XzDecoder; use std::io::Read; fn main() -> Result<(), Box<dyn std::error::Error>> { let compressed: &[u8] = &[/* compressed data */]; let mut decoder = XzDecoder::new(compressed); let mut decompressed = String::new(); decoder.read_to_string(&mut decompressed)?; println!("{}", decompressed); Ok(()) }
Debug
Known issues
gotchaThe API is minimal and may not support all LZMA features (e.g., multi-threaded compression).
fix
Consider using the `xz2` crate for more advanced features.
affects: >=0.6.0
Upgrade
Version history
0.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
rust-lzma — cargo add rust-lzma · libregistry