-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra bytes at the end of encoded buffer (zstd) #277
Comments
Thanks for the report, I will take a look! |
@Feresey It is a raw block size 0 but with a "final" block marker. Technically it should be fine, while it could be simplified. What is the error you are seeing? |
$ zstd -d test.zst
zstd: test already exists; overwrite (y/N) ? y
test.zst : 0 MB... zstd: test.zst: unknown header |
Ah, it could be that it is after the final block. 👍 |
Ah, yes
|
I will fix and also add this check to the decoder. |
Great thanks for such rapid response! Happy to see that this problem can be resolved! |
Two 'last' blocks was added on small payloads when using ReadFrom. Fixes #277
Fix in #277 - I will probably make a new release soon. |
Two 'last' blocks was added on small payloads when using ReadFrom. Fixes #277
@Feresey |
Sorry to reply in closed issue, but I want to say this |
@zachcheung Sorry, do you have a point? What would you expect me to do? |
@klauspost Nope, bumped Thanks for writing such great package. :) |
I have found that current implementation of zstd (v1.10.10) adds three extra bytes to the end of encoded byte stream (
01 00 00
). These bytes makes unable to uncompress archive with standard GNU zstd utility.Example code:
Prints:
28 b5 2f fd 04 00 09 00 00 30 ec af 44 12 01 00 00
At the same time with GNU zstd:
Note last 3 extra bytes.
Also, version 1.9.0 works like the GNU zstd.
The text was updated successfully, but these errors were encountered: