Anyreader
A library for reading streams of compressed and uncompressed data without knowing the format in advance.
You can use this to recursively read raw data from potentially compressed streams that may contain archives.
Installation:
cargo add anyreader
Example:
The code below will read the contents of a tar.gz archive and print the size of each file. Any archives or compressed files within the archive will also be recursively read:
use ;
use Path;
use File;
use ;
CLI
The anyreader crate also comes with a CLI tool that can be used to read files from the command line. It will
recursively read any archives or compressed files within the input files, and write the decompressed, flattened
contents to the output file in a tar format.
This requires the cli feature: cargo install anyreader -F cli
<INPUT>...
<OUTPUT> Output