Crates.io | audec |
lib.rs | audec |
version | 0.1.0 |
source | src |
created_at | 2023-08-02 15:34:40.633872 |
updated_at | 2023-08-02 15:34:40.633872 |
description | Automatic decompression |
homepage | |
repository | https://github.com/a-maier/audec |
max_upload_size | |
id | 932847 |
size | 6,854 |
Small utility to detect compressed streams and automatically decompress them.
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)?;
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