ziperu: a drop in rubyzip replacement with a Rust core
I just released ziperu, a drop in replacement for rubyzip backed by Rust. Swap the Gemfile line, keep require "zip", and existing code runs unchanged, 2x to 6x faster in my benchmarks against rubyzip 3.7.
It ships precompiled for Linux (glibc and musl), macOS and Windows on Ruby 3.1 to 4.0, so there’s no toolchain to install. Reads and writes release the GVL, so other threads keep running while it works.
To check compatibility I run rubyzip’s own test suite against it, plus the test suites of gems built on rubyzip: roo, caxlsx, rubyXL, docx and others. It’s also stricter by default: extraction can’t escape the destination directory, and you can cap entry count, total size and compression ratio to stop zip bombs.
It’s a new gem (0.2.x), so I’d love bug reports from anyone who tries it on a real app.
Post a comment