GorillaStream.Compression.Encoder.BitPacking (gorilla_stream v3.0.3)

Copy Markdown View Source

Bit packing module for combining timestamp deltas and compressed values into a single bitstream.

This module takes the output from delta encoding and value compression and packs them into an efficient binary format for the Gorilla compression algorithm.

The format is:

  1. Header with metadata about the data
  2. Timestamp-encoded bitstream
  3. Value-encoded bitstream
  4. Padding to byte boundary if necessary

Summary

Functions

Packs timestamp deltas and compressed values into a single binary stream.

Unpacks binary data back into timestamp and value bitstreams.

Functions

pack(arg1, arg2)

Packs timestamp deltas and compressed values into a single binary stream.

Parameters

  • {timestamp_bits, timestamp_metadata}: Encoded timestamp data from DeltaEncoding
  • {value_bits, value_metadata}: Encoded value data from ValueCompression

Returns

  • {packed_binary, combined_metadata}: Packed binary data and metadata

unpack(packed_binary)

Unpacks binary data back into timestamp and value bitstreams.

Parameters

  • packed_binary: The packed binary data

Returns

  • {timestamp_bits, value_bits, metadata}: Unpacked components