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
Citations
- Pelkonen et al., Gorilla, PVLDB 8(12), 1816-1827 (2015), section 4.1
- Facebook Beringei: appendValue and readNextValue, pinned 75c3002
- Hesela: exact XOR-window and restart accounting
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]