Bulk data (de-)compressor used for leaves in IndexSegments. The
compression and decompression operations of a given RecordCompressor
reuse a shared instance buffer. Any decompression result is valid only until
the next compression or decompression operation performed by that
RecordCompressor. When used in a single-threaded context this reduces
allocation while maximizing the opportunity for bulk transfers.

A read-only view onto a shared buffer. The data between
position() and limit() are the decompressed data. The contents of
this buffer are valid only until the next compression or
decompression request. The position will be zero. The limit will
be the #of decompressed bytes.

decompress

This decompresses data into a shared instance byte[]. If the byte[] runs
out of capacity then a new byte[] is allocated with twice the capacity,
the data is copied into new byte[], and decompression continues. The
shared instance byte[] is then returned to the caller. This approach is
suited to single-threaded processes that achieve a suitable buffer size
and then perform zero allocations thereafter.

Returns:

A read-only view onto a shared buffer. The data between
position() and limit() are the decompressed data. The contents of
this buffer are valid only until the next compression or
decompression request. The position will be zero. The limit will
be the #of decompressed bytes.