bunko 0.1.0

bunko is a lightweight, flexible, high-performance Rust library for data compression and decompression.
Documentation
  • Coverage
  • 53.33%
    8 out of 15 items documented0 out of 9 items with examples
  • Size
  • Source code size: 15.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 224.49 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • reinacchi

bunko 📦🔥

bunko is a lightweight, flexible, and high-performance Rust library for data compression and decompression. bunko simplifies handling Gzip, Zlib and Deflate compression in both single-pass and streaming modes while leveraging Rust's safety and performance.

Why choose bunko?

  • Built with Rust, bunko offers incredible performance with low overhead.
  • No manual memory management, ensuring safety at every step.
  • Designed to be intuitive, whether you're compressing small strings or handling large data streams.

Getting Started

Installation

Add bunko to your Cargo.toml:

[dependencies]

bunko = "0.1.0"

Example: Gzip Compression and Decompression

use bunko::{compress_string, decompress_to_string, CompressionLevel};

fn main() {
    let input = "Hello, Bunko!";
    println!("Original: {}", input);

    // Compress the string
    let compressed = compress_string(input, CompressionLevel::Best)
        .expect("Failed to compress string");
    println!("Compressed size: {} bytes", compressed.len());

    // Decompress the string
    let decompressed = decompress_to_string(&compressed)
        .expect("Failed to decompress string");
    println!("Decompressed: {}", decompressed);

    assert_eq!(input, decompressed);
}

License

This library is licensed under MIT.