You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the frame header of the compressed data does not contain the content
size ``max_output_size`` must be specified or ``ZstdError`` will be
raised. An allocation of size ``max_output_size`` will be performed and an
attempt will be made to perform decompression into that buffer. If the
buffer is too small or cannot be allocated, ``ZstdError`` will be
raised. The buffer will be resized if it is too large.
This is then a feature request, since I think it would be an useful addition.
CaselIT
changed the title
decompress fails to decompress data compressed with stream_reader if max_output_size is not provided
Feature request: allow decompress to decompress stream data without content size in the header
Apr 26, 2021
Edit: this is documented, but I think it would be an useful addition. Maybe by passing
max_output_size=-1
?The example below raises
ZstdError: could not determine content size in frame header
Passing
max_output_size
to the decompress call works as expected:Using
ZstdDecompressor.stream_reader
also works:I think
decompress
should handle this case as well, since it's not always possible to known how the data was compressed.The package version I use is
zstandard 0.15.2
on windows 10 (but I don't think it's os dependent)The text was updated successfully, but these errors were encountered: