Skip to content

zstd: Add DecodeAllCapLimit - #649

Merged
klauspost merged 3 commits into
masterfrom
add-DecodeAllCapLimit
Jul 29, 2022
Merged

zstd: Add DecodeAllCapLimit#649
klauspost merged 3 commits into
masterfrom
add-DecodeAllCapLimit

Conversation

@klauspost

Copy link
Copy Markdown
Owner

WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, or any size set in WithDecoderMaxMemory.

This can be used to limit decoding to a specific maximum output size.

Disabled by default.

Fixes #647

WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, or any size set in WithDecoderMaxMemory.

This can be used to limit decoding to a specific maximum output size.

Disabled by default.

Fixes #647

@dsnet dsnet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I only did a high-level look through and it generally looks sensible. I'll report if there are any bugs with it.

@klauspost

Copy link
Copy Markdown
Owner Author

@dsnet I will merge it, so it is easier for you to test. I will however not release, since I am mostly AFK for the next few weeks, just FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: zstd: add DecodedSize function

2 participants