2 stable releases
new 1.0.1 | Apr 19, 2025 |
---|---|
1.0.0 | Apr 17, 2025 |
#297 in Compression
72 downloads per month
18KB
416 lines
lznint
A library for compressing and decompressing data using the LZ-based compression format used by Nintendo in Super Metroid.
Example
let input = [0x1, 0x2, 0x3, 0x4, 0x1, 0x2, 0x3, 0x4];
let compressed = lznint::compress(&input);
println!("{:x?}", compressed); // [63, 1, c3, 4, ff]
let decompressed = lznint::decompress(&compressed).expect("Decompressino failed");
assert_eq!(&decompressed, &input);
Dependencies
~215–660KB
~15K SLoC