EmilyMatt commented on code in PR #10833:
URL: https://github.com/apache/arrow-rs/pull/10833#discussion_r3862209290
##########
arrow-ipc/src/compression.rs:
##########
@@ -328,8 +328,15 @@ fn compress_zstd(
context: &mut IpcWriteContext,
level: i32,
) -> Result<(), ArrowError> {
- let result = context.zstd_compressor(level).compress(input)?;
- output.extend_from_slice(&result);
+ let start = output.len();
+ output.reserve(zstd::zstd_safe::compress_bound(input.len()));
Review Comment:
Yeah I just took it from the function itself as it seems to do all those
steps except into a new Vec
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]