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
async-compression offers no way to call set_pledged_src_size() on the zstd encoder. Could we provide a public API in async-compression to call this?
Context
zstd encoding can include an optional Frame_Content_Size value. Decompression libraries such as Python's zstandard provide APIs (e.g. decompress) that use this value to decompress the data in a single operation. Without it, these libraries must treat the encoded bytes as a stream.
Writing Frame_Content_Size requires two steps (from the zstd manual):
Enable ZSTD_c_contentSizeFlag. async-compression already offers a CParameter method to do this.
Call ZSTD_CCtx_setPledgedSrcSize() to set the decompressed data size. The zstd crate already exposes the public method set_pledged_src_size() for this, but it's not exposed by the async-compression crate.
When set_pledged_src_size is not called, the encoded bytes won't have a Frame_Content_Size value.
The text was updated successfully, but these errors were encountered:
Issue
async-compression
offers no way to callset_pledged_src_size()
on thezstd
encoder. Could we provide a public API inasync-compression
to call this?Context
zstd
encoding can include an optionalFrame_Content_Size
value. Decompression libraries such as Python'szstandard
provide APIs (e.g.decompress
) that use this value to decompress the data in a single operation. Without it, these libraries must treat the encoded bytes as a stream.Writing
Frame_Content_Size
requires two steps (from thezstd
manual):ZSTD_c_contentSizeFlag
.async-compression
already offers aCParameter
method to do this.ZSTD_CCtx_setPledgedSrcSize()
to set the decompressed data size. Thezstd
crate already exposes the public methodset_pledged_src_size()
for this, but it's not exposed by theasync-compression
crate.When
set_pledged_src_size
is not called, the encoded bytes won't have aFrame_Content_Size
value.The text was updated successfully, but these errors were encountered: