Skip to content

Commit

Permalink
clarify Data Block in the Frame format documentation
Browse files Browse the repository at this point in the history
as requested in #1156
  • Loading branch information
Cyan4973 committed Sep 13, 2022
1 parent 520330e commit 32bfb20
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/lz4_Frame_format.md
Expand Up @@ -16,7 +16,7 @@ Distribution of this document is unlimited.

### Version

1.6.2 (12/08/2020)
1.6.3 (12/09/2022)


Introduction
Expand Down Expand Up @@ -61,9 +61,9 @@ and associated error message explaining which parameter is unsupported.
General Structure of LZ4 Frame format
-------------------------------------

| MagicNb | F. Descriptor | Block | (...) | EndMark | C. Checksum |
|:-------:|:-------------:| ----- | ----- | ------- | ----------- |
| 4 bytes | 3-15 bytes | | | 4 bytes | 0-4 bytes |
| MagicNb | F. Descriptor | Data Block | (...) | EndMark | C. Checksum |
|:-------:|:-------------:| ---------- | ----- | ------- | ----------- |
| 4 bytes | 3-15 bytes | | | 4 bytes | 0-4 bytes |

__Magic Number__

Expand Down Expand Up @@ -269,7 +269,7 @@ The size does not include the block checksum if present.

_Block_Size_ shall never be larger than _Block_Maximum_Size_.
Such an outcome could potentially happen for non-compressible sources.
In such a case, such data block must be passed using uncompressed format.
In such a case, such data block **must** be passed using uncompressed format.

A value of `0x00000000` is invalid, and signifies an _EndMark_ instead.
Note that this is different from a value of `0x80000000` (highest bit set),
Expand Down Expand Up @@ -397,6 +397,8 @@ and trigger an error if it does not fit within acceptable range.
Version changes
---------------

1.6.3 : minor : clarify Data Block

1.6.2 : clarifies specification of _EndMark_

1.6.1 : introduced terms "LZ4 Frame Header" and "LZ4 Frame Footer"
Expand Down

0 comments on commit 32bfb20

Please sign in to comment.