anyreader 0.1.0

Transparently read compressed streams of data, with format detection
Documentation
1
2
3
4
5
6
7
8
9
10
11
use anyreader::AnyReader;
use std::fs::File;

fn main() {
    // Supports compressed files
    let file = File::open("file.zstd").unwrap();
    let mut reader = AnyReader::from_reader(file).unwrap();
    assert!(reader.is_zst());
    // Read the data
    assert_eq!(std::io::read_to_string(&mut reader).unwrap(), "hello world");
}