snes_compress

Crates.iosnes_compress
lib.rssnes_compress
version0.1.4
sourcesrc
created_at2022-10-22 15:54:26.785665
updated_at2022-10-25 22:28:51.642937
descriptionA library for decompressing and recompressing data in SNES games.
homepage
repositoryhttps://github.com/smedit/snes_compress/
max_upload_size
id694581
size49,278
(krankykong)

documentation

README

snes_compress

A compression library for old games.

Supported Formats

  • LZ1

  • LZ19

  • LZ2

  • LZ3

  • LZ5

  • RLE1

  • RLE2

Usage

Rust Library:

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)
}

Shared Library:

TODO: Add wrapper project to compile this to so (linux), dll (windows), and dylib (mac)

Binary:

cargo install snes_compress

Usage:
  snes_compress [option] [format] "<input_file>" "<output_file>"

Options:
  -d: Decompress
  -c: Compress

Formats:
  -LZ5: LZ5

Commit count: 30

cargo fmt