@Override
    protected void onSerialize(Serializer buf) {
        super.onSerialize(buf);
        buf.putInt(null, data.length);
        try {
            LZ4Compressor c = lz4Factory.highCompressor();
            byte[] compressedData = new byte[data.length];
            int compressedSize = c.compress(data, compressedData);
            serializeDataArray(compressedData, compressedSize, buf);
        } catch (LZ4Exception e) {
            // LZ4Compressor.compress will throw this exception if it is unable to compress
            // into compressedData (when compressed size >= original size)
            serializeDataArray(data, data.length, buf);
        }
    }
Serializes the Sketch.

Serialization format
==================
Original size:     4 bytes
Compressed size:   4 bytes
Compressed data:   N * 1 bytes

Invariant:
     compressed size &lt;= original size

Special case:
     compressed size == original size =&gt; data is uncompressed

@param buf Serializer
searchlib/src/main/java/com/yahoo/searchlib/aggregation/hll/NormalSketch.java