Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

34 lines (28 loc) · 1.02 KB

This repo contains a C++ port of gunzip for decompression of .gz files. By default, it relies on Fast CRC32 for CRC32 computation but can be switched to use zlib instead.

Benchmark

Below shows runtime comparison with other C/C++ gunzip implementations.

Decompression of linux.tar.gz (Linux x64)

# Threads GNU Gzip Pigz This
1 4.93 3.26 2.81
2 - 2.35 1.87

Decompression of linux.tar.gz (macOS arm64)

# Threads GNU Gzip Pigz This
1 7.19 2.64 3.44
2 - 2.78 2.89

Build

# Linux
$ cmake -Bbuild -DCMAKE_CXX_FLAGS="-O3 -g -DNDEBUG"
# macOS
$ cmake -Bbuild -DCMAKE_CXX_FLAGS="-O3 -g -DNDEBUG -Wl,-ld_classic -D__BYTE_ORDER=1234" -DCMAKE_CXX_COMPILER=g++-13
$ make -Cbuild -j

Run

# single thread
$ build/gunzip < compressed.gz > decompressed

# two threads
$ build/gunzip -t < compressed.gz > decompressed