Stream VByte: Faster Byte-Oriented Integer Compression

Daniel Lemire, Nathan Kurz, Christoph Rupp
9/25/2017
cs.IRcs.DB

Official code: fast-pack/streamvbyte (419 stars, Apache-2.0, last commit 2026-10-14).

Abstract

Arrays of integers are often compressed in search engines. Though there are many ways to compress integers, we are interested in the popular byte-oriented integer compression techniques (e.g., VByte or Google's Varint-GB). They are appealing due to their simplicity and engineering convenience. Amazon's varint-G8IU is one of the fastest byte-oriented compression technique published so far. It makes judicious use of the powerful single-instruction-multiple-data (SIMD) instructions available in commodity processors. To surpass varint-G8IU, we present Stream VByte, a novel byte-oriented compression technique that separates the control stream from the encoded data. Like varint-G8IU, Stream VByte is well suited for SIMD instructions. We show that Stream VByte decoding can be up to twice as fast as varint-G8IU decoding over real data sets. In this sense, Stream VByte establishes new speed records for byte-oriented integer compression, at times exceeding the speed of the memcpy function. On a 3.4GHz Haswell processor, it decodes more than 4 billion differentially-coded integers per second from RAM to L1 cache.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Fast integer compression in C using the StreamVByte codec

41950C, C++Apr 14, 20161 weeks agoApache-2.0
armcompressioninteger-compressionneonsimd+2 more

Similar Papers

Cite this paper

@article{lemire2017stream,
  title  = {Stream VByte: Faster Byte-Oriented Integer Compression},
  author = {Daniel Lemire and Nathan Kurz and Christoph Rupp},
  year   = {2017},
  eprint = {1709.08990},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1709.08990}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1709.08990.svg)](https://codeofpaper.com/paper/1709.08990)

Discussion