code: private void writeByteBufferSerdeHeader(ByteBuffer buf, byte mode)
    {
      buf.put(SERIALIZATION_VERSION);
      buf.put(mode);
    }
docs: Write a serialization header containing the serde version byte and full/sparse encoding mode byte.
  
  This header is not needed when serializing the histogram for localized internal use within the
  buffer aggregator implementation.
  
  @param buf Destination buffer
  @param mode Full or sparse mode