Crates.io | snes_compress |
lib.rs | snes_compress |
version | 0.1.4 |
source | src |
created_at | 2022-10-22 15:54:26.785665 |
updated_at | 2022-10-25 22:28:51.642937 |
description | A library for decompressing and recompressing data in SNES games. |
homepage | |
repository | https://github.com/smedit/snes_compress/ |
max_upload_size | |
id | 694581 |
size | 49,278 |
A compression library for old games.
LZ1
LZ19
LZ2
LZ3
LZ5
RLE1
RLE2
Add dependency
https://crates.io/crates/snes_compress
use snes_compress::{CompressionType, errors::{DecompressionError, CompressionError}};
fn decompress_data(compressed_data: &[u8]) -> Result<Vec<u8>, DecompressionError> {
snes_compress::decompress(compressed_data, CompressionType::LZ5)
}
fn compress_data(decompressed_data: &[u8]) -> Result<Vec<u8>, CompressionError> {
snes_compress::compress(decompressed_data, CompressionType::LZ5)
}
TODO: Add wrapper project to compile this to so (linux), dll (windows), and dylib (mac)
cargo install snes_compress
Usage:
snes_compress [option] [format] "<input_file>" "<output_file>"
Options:
-d: Decompress
-c: Compress
Formats:
-LZ5: LZ5