gorilla-compression · research · also Gorilla XOR encoding

Gorilla compression

Gorilla compression represents time-series timestamps by delta-of-delta encoding and values by XOR differences with preceding values.

Mechanism: A zero value XOR needs one bit; a changed value either reuses a stored bit window or describes a new one. Timestamp and value encodings are separate. [1]

Window cost: For a stored width of 64 bits and a new one-bit residual, containment-only reuse costs 66 bits; fresh metadata costs 14. The Beringei implementation checks cost as well as containment. The linked synthetic ledger isolates this decision, not full-stream size. [2] [3]

Restarts: In the ledger, 64 identical values need 127 payload bits in one block or 190 across two blocks. Smaller restart units can increase payload while reducing how much preceding state a read must reconstruct. [3]

Format: The paper and Beringei source use different control-bit conventions. An algorithm name alone does not establish byte compatibility. [1] [2]

Relations

related
Chimp compression, Lossless compression, Delta encoding

Citations

  1. Pelkonen et al., Gorilla, PVLDB 8(12), 1816-1827 (2015), section 4.1 (accessed 2026-11-17)
  2. Facebook Beringei: appendValue and readNextValue, pinned 75c3002 (accessed 2026-11-17)
  3. Hesela: exact XOR-window and restart accounting (accessed 2026-11-17)
Sources & caveats
  • Paper DOI: 10.14778/2824032.2824078. The 2015 system and its workload results are distinct from a portable encoding specification.
  • The ledger counts synthetic value payloads only. Timestamp bits, framing, terminators, byte padding and indexes are excluded; no native compressor or throughput benchmark was run.
  • Beringei's first-value handling also differs from the ledger's raw 64-bit initialization. The cost guard is a local decision, not proof of a globally minimal stream. [2]

JSON: /data/terms/gorilla-compression.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Gorilla compression. Hesela. 2026-11-17. https://hesela.dev/terms/gorilla-compression/