1.4 of the LZ4 Streaming format provides a sound stream interface, yet the
following enhancements would provide more flexiblity for both client and server.
Possible use of 'header' reserved bit and/or new version, when set (1) enables
an extended block format, allowing
a) optional block independence/
permits server to dynamically enable/disable block independence.
b) decompression size/
permits client memory optimisations since the decompressed size
would be known in advance.
Extend block format
[block-size] <data> [source-size] [crc]
o source-size
Only present if the associated header flag is set.
This field uses 4-bytes, format is little-endian.
The block-dependent bit permits the server to dynamically select the
block-dependent/block-independent mode.
- The highest bit is “1” if the data is dependent on
previous; upon change to “1”, the prefix buffer is assumed
to be the related to the previous dependent frame (in any).
- The highest bit is “0” if the data in the block is compressed by LZ4.
All other bits give the decompressed size, in bytes. The reported
size shall never be larger than 'Block Maximum Size'.
Note, this field is included within the optional block crc if present.
Original issue reported on code.google.com by
ada...@gmail.comon 21 Mar 2014 at 9:14