nowfound

Life & fun · August 6, 2022

TP

Thread-Parallel Decompression and Random Access to Gzip Files (Pragzip)

Hello HN, I'm very excited to have finished a gzip decoder that can speed up decompression using threads. On my Ryzen 3900X, I measured a 8x speedup over standard gzip, reaching 1.6 GB/s for a synthetic file with a consistent compression ratio of 1.3. A functional decompressor like this is kind of a first, that's why I am excited. Pragzip implements the two-staged decompression idea put forward with pugz, which unfortunately only works with gzipped text files not arbitrary files and has many more limitations. I think my main contribution over pugz might be a fast (~10 MB/s)…

In plain words

Pragzip is a gzip decompressor that uses multi-threading to speed up decompression of compressed files. It achieves up to 8x faster decompression than standard gzip by implementing parallel decompression across multiple threads, reaching speeds of 1.6 GB/s on compatible hardware. Unlike similar tools, Pragzip works with arbitrary gzip files rather than just text, and includes a fast deflate block finder for locating compressed data blocks. It is available as both a C++ tool and through PyPI.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hello HN, I'm very excited to have finished a gzip decoder that can speed up decompression using threads. On my Ryzen 3900X, I measured a 8x speedup over standard gzip, reaching 1.6 GB/s for a synthetic file with a consistent compression ratio of 1.3. A functional decompressor like this is kind of a first, that's why I am excited. Pragzip implements the two-staged decompression idea put forward with pugz, which unfortunately only works with gzipped text files not arbitrary files and has many more limitations. I think my main contribution over pugz might be a fast (~10 MB/s) data-agnostic deflate block finder, which might btw also be used to rescue corrupted gzip files). Note that pigz does compress files in parallel but it effectively is not able to decompress not even their own produced files in parallel. You can try out pragzip via PyPI or by building the C++ pragzip tool from source: python3 -m pip install --user pragzip pragzip --version # 0.2.0 Here is a quick comparison with a very Huffman-intensive workload tested on a 12-core Ryzen 3900X: base64 /dev/urandom | head -c $(( 4 * 1024 * 1024 * 1024 )) > 4GiB gzip 4GiB # compresses to a 3.1 GiB large file called 4GiB.gz time gzip -d -c 4GiB.gz | wc -c # real ~21.6 s (~200 MB/s) time pigz -d -c 4GiB.gz | wc -c # real ~12.9 s (~332 MB/s) time pragzip -P 0 -d -c 4GiB.gz | wc -c # real ~2.7 s (~1.6 GB/s decompression bandwidth) I have unit tests for files produced with gzip, bgzip, igzip, pigz, Python's gzip, and python-pgzip. It should therefore work for any "normal" gzip file and is feature-complete but needs a lot of testing and polishing. Note that it is very memory-intensive depending on the archive's compression factor and of course the number of cores being used. This will be subject to further improvements. Bug reports, feature requests, or anything else are very welcome!

More life & fun this month

the category →
  • TL

    Life & fun · 10d ago · louisabraham.github.io

  • Photosynthesis fires two of your iPhone

    Life & fun · 28d ago · photosynthesis.camera

  • SoloUno310

    Take control of hair pulling, nail biting & skin picking

    Life & fun · 28d ago · solouno.io

  • Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.

    Life & fun · 26d ago · everycube.alen.is

  • The Interactive 3D Encyclopedia

    Life & fun · 21d ago · expeditione.fun

  • Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…

    Life & fun · 26d ago · baselashraf81.github.io

Launched alongside, August 2022

the whole month →
  • Xnapper1,517

    Take beautiful screenshots instantly

    Work · 2022 · xnapper.com

  • Gamma1,169

    Write like a doc, present like a deck

    Work · 2022 · gamma.app

  • Threado923

    The command center for community builders

    Life & fun · 2022

  • Build remote engineering teams in 24 hours

    Dev tools · 2022 · remotebase.com

  • Convert Figma designs into Flutter 3.0 & React code rapidly

    Dev tools · 2022 · dhiwise.com

  • PA

    Hey HN, I've been working on https:&#x2F;&#x2F;pornpen.ai, a site for generating adult images. Please only visit the site if you are 18+ and willing to look at NSFW images. This site is an experiment using newer text-to-image models. I explicitly removed the ability to specify custom text to avoid harmful imagery from being generated. New tags will be added once the prompt-engineering algorithm is fine-tuned further. If the servers are overloaded, take a look at the feed and search pages to look through past results. For comments&#x2F;suggestions&#x2F;feedback please visit…

    AI · 2022 · pornpen.ai