Commit Graph

6 Commits

Author SHA1 Message Date
Yann Collet
013fee5665 updated block format with more details on MF_LIMIT
aka distance from end of block for the last match.
2019-04-11 13:55:35 -07:00
Yann Collet
7a4e04e6a6 updated LZ4 block format
rewording the end of block conditions
for clarity and answering related questions.
2019-01-02 14:36:12 -08:00
Cyan4973
bd92689798 minor edit of block format
clarifying parsing restrictions near end of block.
2018-04-25 06:42:57 -07:00
Alexey Tourbin
ff9b4cf826 lz4_Block_format.md: clarify on short inputs and restrictions
It occurred to me that the formula "The last 5 bytes are always
literals", on the list of "assumptions made by the decoder", is
remarkably ambiguous.  Suppose the decoder is presented with 5 bytes.
Are they literals?  It may seem that the decoder degenerates
to memcpy on short inputs.  But of course the answer is no,
so the formula needs some clarification.

Parsing restrictions should be explained as well, otherwise they look
like arbitrary numbers.  The 5-byte restriction has been mentioned
recently in connection with the shortcut in LZ4_decompress_generic,
so I add that.  The second restriction is left to be explained
by the author.

I also took the liberty to explain that empty inputs "are either
unrepresentable or can be represented with a null byte".  This wording
may actually have some merit: it leaves for the implementation,
as opposed to the spec, to decide whether the encoder can compress
empty inputs, and whether the decoder can produce an empty output
(which the implementation should further clarify).
2018-04-25 02:39:28 +03:00
Yann Collet
7e15e240ab added a paragraph on overlap matches 2017-06-06 11:20:36 -07:00
Przemyslaw Skibinski
88cef262ec documentation moved to doc/ 2016-11-03 13:25:20 +01:00