Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GZIP Decoder

A gzip decoder for learning purpose.

Usage

Command Line Interface

Decompress a GZIP file:

cargo run -- <file.gz>

As a Library

use gzip_decoder::decode_gzip_bytes;

let compressed = std::fs::read("file.gz")?;
let decompressed = decode_gzip_bytes(&compressed)?;

If you already have a reader, use the reader-based API:

use gzip_decoder::decode_gzip;

let file = std::fs::File::open("file.gz")?;
let reader = std::io::BufReader::new(file);
let decompressed = decode_gzip(reader)?;

Development

Running Tests

Execute the unit test suite:

cargo test

Fuzz Testing

Run fuzz tests to verify robustness against arbitrary and malformed inputs:

# GZIP: arbitrary inputs
cargo fuzz run arbitrary_input

# GZIP: roundtrip encoding/decoding
cargo fuzz run valid_gzip_roundtrip

Resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages