Zroar – Serialized Roaring Bitmaps in Zig
zroar is a ground-up implementation of Roaring Bitmaps data structure in Zig. zroar stores both the keys and (array, bitmap) containers in a single flat byte buffer, making the in-memory representation equal to the on-disk or over-the-network representation, eliminating the serialization/deserialization step entirely. The design was originally aimed at systems which keep their posting lists on disk, but zroar performs faster than CRoaring even for purely in-memory ops, due to CPU cache locality. Against CRoaring 5.0's benchmarking suite (ported to Zig), zroar is faster in 339 out of 360…
What it does
Serialized Roaring Bitmaps in Zig. Contribute to manishrjain/zroar development by creating an account on GitHub.
zroar is a ground-up implementation of the popular roaring bitmaps data structure in a serialized form. zroar keeps all the MSB 48-bit keys (high48) and containers in a single flat byte buffer, so the in-memory form of zroar is the serialized form, which can then be stored to disk or sent over the network as is. When opening a zroar buffer, there's no parsing or per-container allocation. All read/write operations can be done on the buffer immediately. The hot paths are explicitly vectorized with SIMD using Zig's native support: container searches, set operations on both container types, and extracting values out into arrays. zroar — one single buffer ┌───────────────────────────┐…from github.com
In the maker’s words, at launch
zroar is a ground-up implementation of Roaring Bitmaps data structure in Zig. zroar stores both the keys and (array, bitmap) containers in a single flat byte buffer, making the in-memory representation equal to the on-disk or over-the-network representation, eliminating the serialization/deserialization step entirely. The design was originally aimed at systems which keep their posting lists on disk, but zroar performs faster than CRoaring even for purely in-memory ops, due to CPU cache locality. Against CRoaring 5.0's benchmarking suite (ported to Zig), zroar is faster in 339 out of 360 tests, being 2x-9x faster (geometric mean), and up to 600x faster on serialize/deserialize. zroar avoids complex mechanism (like adaptive radix trees), uses Zig native SIMD ops and is simpler. The main logic is written in ~2000 lines of code, while CRoaring's 64-bit bitmap codebase is over 17000 LOC. Not yet: By choice, zroar doesn't support run containers, and is 64-bit only. There are more details in the GitHub README. Try it out! I'd love feedback on the API and design. zroar is a Zig-based successor to my other project, sroar in Go, which showed a similar boost. So, I think this design should show performance gains in any language.
Does the same job
all alternatives →- 1410-40% faster LZMA decoder using x86 CMOVcc2021 · gist.github.com · ▲205
- ZZZDS – Zig Data StructuresDec 2025 · github.com · ▲5
A collection of high-performance data structures for Zig.
- MAMagnetar, a high-perf BitTorrent parsing and manipulation library2025 · github.com · ▲7
It provides zero-dependency, memory-safe operations for working with torrent files, bencode data, and magnet links.
- BJByteArray.js – A binary library for JavaScript2018 · github.com · ▲36
- ZAzcrun – a minimal Linux container runtime in Zig2024 · github.com · ▲5
- ESExtremely simple, fast, efficient, cross-platform serialization format2020 · github.com · ▲14
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
SoloUno▲310Take 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


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 2026
the whole month →- TL
Life & fun · 10d ago · louisabraham.github.io


- SA
Hello HN! I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy. I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has. The methodology might be a bit shaky, but hopefully the result is as helpful for…
Life & fun · Aug 2026 · toneyalexander.github.io


I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com