| Crates.io | lz-decompress |
| lib.rs | lz-decompress |
| version | 0.2.1 |
| created_at | 2025-05-06 06:52:56.121046+00 |
| updated_at | 2025-05-07 17:32:47.345821+00 |
| description | Rust bindings to lzlib for decompressing .lz files |
| homepage | https://github.com/marcmo/lz-decompress |
| repository | https://github.com/marcmo/lz-decompress |
| max_upload_size | |
| id | 1661944 |
| size | 493,675 |
Rust bindings for the lzlib compression library — providing decompression support for .lz files.
This crate offers a safe Rust interface to a subset of lzlib, exposing a function to decompress .lz files.
.lz files using lzlibuse std::path::Path;
use lzlib_rs::decompress_file;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let input = Path::new("test.txt.lz");
let output = Path::new("test.txt");
decompress_file(input, output)?;
println!("Decompressed to {}", output.display());
Ok(())
}
This crate supports building on Windows with both x86_64 and aarch64 MSVC targets.
Install MSVC Build Tools, including required architectures:
Install Rust targets as needed:
rustup target add x86_64-pc-windows-msvc
rustup target add aarch64-pc-windows-msvc
Rust target is installed:
rustup target add aarch64-pc-windows-msvc
Building
cargo build --target x86_64-pc-windows-msvc
cargo build --target aarch64-pc-windows-msvc
This crate is distributed under the terms of the 2-clause BSD license, the same as the upstream lzlib C library.
See LICENSE.txt for full text. Original C code copyright © Antonio Diaz Diaz.