-
Is your ZSTD implementation protected against problems similar to "zip bomb"? If yes do you have some documentation or code to point to? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
klauspost
Jan 4, 2023
Replies: 1 comment 1 reply
-
WithDecoderMaxMemory or WithDecodeAllCapLimit and supply a destination buffer with the capacity you don't want to exceed. For streams you can set WithDecoderMaxWindow, if 512MB per decode is a problem. This encoder will not automatically select any window size bigger than 32MB (with SpeedBestCompression), but other implementations may have different limits. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
klauspost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WithDecoderMaxMemory or WithDecodeAllCapLimit and supply a destination buffer with the capacity you don't want to exceed.
For streams you can set WithDecoderMaxWindow, if 512MB per decode is a problem. This encoder will not automatically select any window size bigger than 32MB (with SpeedBestCompression), but other implementations may have different limits.