Skip to main content

encode_to_java_bytes

Function encode_to_java_bytes 

Source
pub fn encode_to_java_bytes(sketch: &DDSketch) -> Vec<u8> 
Expand description

Encode a DDSketch into the Java-compatible binary format.

The output follows the encoding order of DDSketchWithExactSummaryStatistics.encode() then DDSketch.encode():

  1. Summary statistics: COUNT, MIN, MAX (if count > 0)
  2. SUM (if sum != 0)
  3. Index mapping (LOG layout): gamma, indexOffset
  4. Zero count (if > 0)
  5. Positive store bins
  6. Negative store bins