Debian Codegraph @

README.md

raw symbols SCIP
1 # lzxd
2
3 A Rust implementation of [Microsoft's lzxd encoding][1], based in the description and code of
4 the document itself. This crate currently only implements decompression.
5
6 ```rust
7 use lzxd::{Lzxd, WindowSize};
8
9 let mut lzxd = Lzxd::new(WindowSize::KB64);
10
11 while let Some(chunk) = get_compressed_chunk() {
12 let decompressed = lzxd.decompress_next(&chunk);
13 write_data(decompressed.unwrap());
14 }
15 ```
16
17 The project's motivation was to be able to read XNB files produced by XNA Game Studio, some of
18 which are compressed under LZXD compression.
19
20 Huge thanks to [LeonBlade for their xnbcli][2] project which helped greatly to debug this
21 implementation, and special mention to [dorkbox's CabParser][3] for further helping validate
22 that this implementation is able to decompress real-world data correctly.
23
24 ## License
25
26 This library is licensed under either of
27
28 * Apache License, Version 2.0 ([LICENSE-APACHE] or
29 http://www.apache.org/licenses/LICENSE-2.0)
30
31 * MIT license ([LICENSE-MIT] or http://opensource.org/licenses/MIT)
32
33 at your option.
34
35 [1]: https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-patch/cc78752a-b4af-4eee-88cb-01f4d8a4c2bf
36 [2]: https://github.com/LeonBlade/xnbcli
37 [3]: https://github.com/dorkbox/CabParser/
38 [LICENSE-APACHE]: LICENSE-APACHE
39 [LICENSE-MIT]: LICENSE-MIT