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
With the experimental flag enabled, there are two functions you can use:
zstd_safe::get_frame_content_size: given a prefix of the frame (at least ~5 bytes long), returns the decompressed size of this frame.
zstd_safe::find_decompressed_size: given the entire compressed content (could be a series of several frames), returns the total decompressed size (the sum of the decompressed size of each frame).
These are not available on Decoder itself - a Decoder could be in the middle of streaming, and have no memory of the header, and no knowledge of future frames in the stream.
We could at least re-export these methods in zstd itself.
to my best understanding zstd has an optional header field telling us how big the uncompressed size is,
alternatively you could sum up all frames?
it would be nice to have
Decoder::size_hint(&self) -> Option <u64>
The text was updated successfully, but these errors were encountered: