1 unstable release

0.1.0 Aug 2, 2023

#617 in Compression

Download history 2/week @ 2024-11-13 10/week @ 2024-11-20 5/week @ 2024-11-27 3/week @ 2024-12-04 8/week @ 2024-12-11 14/week @ 2025-01-29 5/week @ 2025-02-05 30/week @ 2025-02-19 23/week @ 2025-02-26

62 downloads per month
Used in 2 crates

GPL-3.0-or-later

7KB
96 lines

audec

Small utility to detect compressed streams and automatically decompress them.

Example

use std::{io::BufReader, fs::File};

use audec::auto_decompress;

let input = File::open("maybe_compressed")?;
let mut input = auto_decompress(BufReader::new(input));
let mut decompressed = String::new();
input.read_to_string(&mut decompressed)?;

Features

Each feature enables a decompression format

  • flate2 (default)
  • zstd (default)
  • bzip2
  • lz4
  • lz4_flex

lz4 and lz4_flex are incompatible, at most one them can be enabled.

License: GPL-3.0-or-later


lib.rs:

Small utility to detect compressed streams and automatically decompress them.

Example

use std::{io::BufReader, fs::File};

use audec::auto_decompress;

let input = File::open("maybe_compressed")?;
let mut input = auto_decompress(BufReader::new(input));
let mut decompressed = String::new();
input.read_to_string(&mut decompressed)?;

Features

Each feature enables a decompression format

  • flate2 (default)
  • zstd (default)
  • bzip2
  • lz4
  • lz4_flex

lz4 and lz4_flex are incompatible, at most one them can be enabled.

Dependencies

~4MB
~69K SLoC