RFC Errata
RFC 8878, "Zstandard Compression and the 'application/zstd' Media Type", February 2021
Note: This RFC has been updated by RFC 9659
Source of RFC: IETF - NON WORKING GROUPArea Assignment: art
See Also: RFC 8878 w/ inline errata
Errata ID: 7297
Status: Verified
Type: Technical
Publication Format(s) : TEXT, PDF, HTML
Reported By: Felix Handte
Date Reported: 2023-01-03
Verifier Name: Murray Kucherawy
Date Verified: 2024-08-22
Section 3.1.1.3.1.1 says:
Size_Format == 01: 4 streams. Both Regenerated_Size and Compressed_Size use 10 bits (values 0-1023). Literals_Section_Header uses 3 bytes. Size_Format == 10: 4 streams. Both Regenerated_Size and Compressed_Size use 14 bits (values 0-16383). Literals_Section_Header uses 4 bytes. Size_Format == 11: 4 streams. Both Regenerated_Size and Compressed_Size use 18 bits (values 0-262143). Literals_Section_Header uses 5 bytes.
It should say:
Size_Format == 01: 4 streams. Both Regenerated_Size and Compressed_Size use 10 bits (values 6-1023). Literals_Section_Header uses 3 bytes. Size_Format == 10: 4 streams. Both Regenerated_Size and Compressed_Size use 14 bits (values 6-16383). Literals_Section_Header uses 4 bytes. Size_Format == 11: 4 streams. Both Regenerated_Size and Compressed_Size use 18 bits (values 6-262143). Literals_Section_Header uses 5 bytes.
Notes:
The calculation for the size of the fourth stream, specified in section 3.1.1.3.1.6, will underflow if the total size of the literals in the block is less than 6 bytes. So the 4-stream mode cannot be used in blocks with fewer than 6 literals. (Nor should it be, since it is strictly less efficient for very small literal sections.)
The source for this errata is https://github.com/facebook/zstd/pull/3398.
[Verifier note: Confirmed with zstd developers.]