Crates.io | lzxd |
lib.rs | lzxd |
version | 0.2.5 |
source | src |
created_at | 2020-07-13 08:54:57.845265 |
updated_at | 2023-12-27 12:31:12.571201 |
description | Decompression implementation for Microsoft's LZXD compression format. |
homepage | https://github.com/Lonami/lzxd |
repository | https://github.com/Lonami/lzxd |
max_upload_size | |
id | 264637 |
size | 82,239 |
A Rust implementation of Microsoft's lzxd encoding, based in the description and code of the document itself. This crate currently only implements decompression.
use lzxd::{Lzxd, WindowSize};
let mut lzxd = Lzxd::new(WindowSize::KB64);
while let Some(chunk) = get_compressed_chunk() {
let decompressed = lzxd.decompress_next(&chunk);
write_data(decompressed.unwrap());
}
The project's motivation was to be able to read XNB files produced by XNA Game Studio, some of which are compressed under LZXD compression.
Huge thanks to LeonBlade for their xnbcli project which helped greatly to debug this implementation, and special mention to dorkbox's CabParser for further helping validate that this implementation is able to decompress real-world data correctly.
This library is licensed under either of
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.