{
  "slug": "stream-vbyte",
  "term": "Stream VByte",
  "aliases": [
    "StreamVByte"
  ],
  "definition": "Stream VByte is a byte-oriented integer codec that stores control bytes separately from the encoded integer data.",
  "note": "Layout: Each control byte describes the widths of up to four unsigned 32-bit values. Separating controls removes the dependency of locating the next control after a variable-sized data block. This changes the format rather than transparently accelerating an existing VByte stream. [svb-paper]\n\nAPI: The ordinary codec uses one to four data bytes per integer. The caller supplies the integer count. The padded decoder may read 16 extra bytes; decode_unpadded avoids that padding requirement but still requires valid input. The 0124 and differential formats have separate contracts. [svb-api]\n\nValidation: validate_stream checks encoded size against count and control widths. It does not authenticate integer values. A same-length payload change can pass this check while changing a decoded value. [svb-code]",
  "related": [
    "variable-length-integer",
    "zigzag-encoding"
  ],
  "citations": [
    {
      "id": "svb-paper",
      "title": "Lemire, Kurz and Rupp: Stream VByte, Information Processing Letters 130 (2018), sections 3-5",
      "url": "https://arxiv.org/abs/1709.08990",
      "accessed": "2026-11-17"
    },
    {
      "id": "svb-api",
      "title": "StreamVByte public API, pinned revision 089549994faf",
      "url": "https://github.com/fast-pack/streamvbyte/blob/089549994faf3657c13e62f6a1a7b2f544308922/include/streamvbyte.h",
      "accessed": "2026-11-17"
    },
    {
      "id": "svb-code",
      "title": "StreamVByte size validation, pinned revision 089549994faf",
      "url": "https://github.com/fast-pack/streamvbyte/blob/089549994faf3657c13e62f6a1a7b2f544308922/src/streamvbyte_decode.c#L152-L196",
      "accessed": "2026-11-17"
    }
  ],
  "status": "unknown",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-17",
  "provenance": [
    "Paper review and a bounded native codec probe, not a reproduction of the paper's performance benchmark.",
    "The API details apply to revision 089549994faf3657c13e62f6a1a7b2f544308922.",
    "Probe and observed results: https://hesela.dev/research/stream-vbyte-probe.py and https://hesela.dev/research/stream-vbyte-probe.json."
  ]
}
