doc: update stale invalid example frame in doc/decompressor_errata.md (follow-up to #3482)

Open Beginner friendly
#5,128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
documentation

Research direction

Open doc/decompressor_errata.md and read the “Compressed block with 0 literals and 0 sequences” entry around line 65. Replace the invalid example frame with 28b5 2ffd 0000 1500 0000 00, as suggested in the issue. Done when the documented frame matches the corrected example from #3482.

Written by the indexing model from the issue text.

Description

Describe the bug
Follow-up to #3482:

In #3482, tests/golden-decompression/empty-block.zst was fixed from:

  • 28b5 2ffd 2000 1500 0000 00 (Single_Segment_flag = 1, FCS = 0 -> Window_Size = 0 -> Block_Maximum_Size = 0, which is invalid per RFC 8878 because its 2-byte Compressed_Block violates Block_Size <= Block_Maximum_Size)

to:

  • 28b5 2ffd 0000 1500 0000 00 (Window_Descriptor = 0 -> Window_Size = 1024, valid frame).

However, doc/decompressor_errata.md:65 (under "Compressed block with 0 literals and 0 sequences") still lists the old invalid frame 28b5 2ffd 2000 1500 0000 00 as a valid example whose "Last affected version" is v1.5.2, even though v1.5.6, v1.6.0, and dev (539a64c423) all reject it.

(Note: The separate one-shot vs streaming error-code difference on that invalid frame — srcSize_wrong vs corruption_detected — is already being addressed by open PR #5102, which does not update doc/decompressor_errata.md.)

To Reproduce
Verified on dev 539a64c423:

xxd tests/golden-decompression/empty-block.zst
# 00000000: 28b5 2ffd 0000 1500 0000 00              (./........

sed -n '56,66p' doc/decompressor_errata.md
# Compressed block with 0 literals and 0 sequences
# ------------------------------------------------
# **Last affected version**: v1.5.2
# ...
# **Example Frame**: `28b5 2ffd 2000 1500 0000 00`

printf '\x28\xb5\x2f\xfd\x20\x00\x15\x00\x00\x00\x00' | zstd -d -c
# zstd: /*stdin*\: Decoding error (36) : Data corruption detected

Expected behavior
Update doc/decompressor_errata.md:65 from 28b5 2ffd 2000 1500 0000 00 to 28b5 2ffd 0000 1500 0000 00 (or link tests/golden-decompression/empty-block.zst) so it is a valid frame matching #3482.

Desktop (please complete the following information):

  • OS: Linux x86_64 (Ubuntu 22.04)
  • Version: dev 539a64c423 (v1.6.0+)
  • Compiler: gcc 11.4.0
  • Flags: -O2
  • Build system: Makefile

Additional context
Suggested diff:

--- a/doc/decompressor_errata.md
+++ b/doc/decompressor_errata.md
@@ -62,7 +62,7 @@
 
 **Produced by the reference compressor**: No
 
-**Example Frame**: `28b5 2ffd 2000 1500 0000 00`
+**Example Frame**: `28b5 2ffd 0000 1500 0000 00`
Dominant language
C
Stars
28.1k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebook/zstd

All issues in facebook/zstd

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.