Skip to content

akgats/gzip-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages