muy_zipido 0.1.1

Rust library to stream and decompress ZIP files on-the-fly without loading into memory
Documentation
use muy_zipido::{
    MuyZipido,
    progress_bar::{Colour, Style},
};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let url = "https://api.os.uk/downloads/v1/products/BuiltUpAreas/downloads?area=GB&format=GeoPackage&redirect";
    println!("Fetching and processing ZIP from: {}", url);

    let extractor = MuyZipido::new(url, 10240)?.with_progress(Style::Blocks, Colour::Magenta);

    let mut total_entries = 0;
    let mut total_bytes = 0;

    for entry_result in extractor {
        match entry_result {
            Ok(entry) => {
                total_entries += 1;
                total_bytes += entry.data.len();

                println!(
                    "Entry {}: {} ({} bytes)",
                    total_entries,
                    entry.filename,
                    entry.data.len()
                );
            }
            Err(e) => {
                eprintln!("Error processing entry: {}", e);
                break;
            }
        }
    }

    println!("\n=== Summary ===");
    println!("Total entries: {}", total_entries);
    println!("Total bytes processed: {}", total_bytes);

    Ok(())
}