← All projects
Project record1 mention
Originally shared on Hacker News

Ziperu

A Ruby gem that is a drop-in replacement for rubyzip with a Rust core: it keeps the rubyzip API (Zip::File, Zip::InputStream) but does parsing, compression and file IO in Rust via magnus/rb-sys, ships precompiled gems requiring no Rust toolchain, and reports ~6x faster reading of many small entries, 2x faster deflating large ones, plus zip-bomb limits, a non-modifying open mode, and multithreaded compression.

Last shared
01 / The problem

What it addresses

rubyzip is pure Ruby and does a lot of per-entry work in Ruby objects, making zip handling slow in Ruby apps that use gems like roo and caxlsx.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Ziperu

    A Ruby gem that is a drop-in replacement for rubyzip with a Rust core: it keeps the rubyzip API (Zip::File, Zip::InputStream) but does parsing, compression and file IO in Rust via magnus/rb-sys, ships precompiled gems requiring no Rust toolchain, and reports ~6x faster reading of many small entries, 2x faster deflating large ones, plus zip-bomb limits, a non-modifying open mode, and multithreaded compression.

    Problem: rubyzip is pure Ruby and does a lot of per-entry work in Ruby objects, making zip handling slow in Ruby apps that use gems like roo and caxlsx.

    Posted by @BambaNugat · Original source ↗

    Story title · @BambaNugat · · Source ↗

    Show HN: Ziperu is rubyzip with a Rust core, same API but faster and safer

    Submitted URL · @BambaNugat · · Source ↗

    https://github.com/caplanmaor/ziperu

    Source text · @BambaNugat · · Source ↗

    My project keeps the rubyzip API (Zip::File, Zip::InputStream, etc.) but does the parsing compression and file IO in Rust, using the zip crate via magnus/rb-sys.

    Source text · @BambaNugat · · Source ↗

    Change a line in your gemfile and I ship precompiled gems so no Rust toolchain to install.

    Source text · @BambaNugat · · Source ↗

    About 6x faster reading lots of small entries, and 2x faster deflating big ones. It also adds a few things rubyzip doesn’t have like limits for zip bombs, an open mode that doesn’t modify the archive, and multithreaded compression.

    Source text · @BambaNugat · · Source ↗

    Annoyed by slow zip handling in Ruby apps in gems like roo and caxlsx, they use rubyzip underneath which is pure Ruby and does a lot of per entry work in Ruby objects which is slow.

    Source text · @BambaNugat · · Source ↗

    Change a line in your gemfile and I ship precompiled gems so no Rust toolchain to install.