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
{{ message }}
Repository navigation
IPC LZ4 decompression allocates and zero-fills a fresh FrameDecoder per buffer #11129
Vec::resize zero-fills, and the buffer is then immediately overwritten in full by read_exact.
Additional context
decompress() already threads a &mut DecompressionContext to both codec arms, and the zstd
arm uses it to hold a reusable decompressor:
let ret = matchself{CompressionCodec::Lz4Frame => decompress_lz4(input, decompressed_size)?,// context unusedCompressionCodec::Zstd(_) => decompress_zstd(input, decompressed_size, context)?,// context used};
DecompressionContext's own doc comment states the intent:
... between subsequent decompression calls to avoid the performance overhead of initialising
a new context for every decompression.
and its only field today is #[cfg(feature = "zstd")] decompressor. So the mechanism to fix
this already exists and is already plumbed to the call site, but the LZ4 arm does
not use it.
Activity
bench(ipc): cover LZ4 reader and writer buffer layouts (apache#11138)
Rich-T-kid commentedon Nov 6, 2026
closed by #12084
mzabaluev commentedon Nov 22, 2026
@Rich-T-kid #12084 deals with the encoder side, while this details a similar problem with the reader/decoder. Can this issue be reopened?
perf(arrow-ipc): decode independent-block lz4 frames without a stream…