lanmao-alibaba opened a new issue, #15102: URL: https://github.com/apache/arrow/issues/15102
### Describe the bug, including details regarding any error messages, version, and platform. Hi guys, I am using arrow java sdk to send lz4/zstd stream to a server which is running c++ arrow sdk, but the c++ arrow report a failure: "Negative buffer resize: -1" After some investigation, I found that Java compress process is not compatible with C++. In Java, the class AbstractCompressionCodec has one optimization, if the buffer size after compression is larger than the uncompressed buffer, AbstractCompressionCodec::compress() will attach the uncompressed buffer directly and mark the buffer size with "-1". But in C++, reader.cc::DecompressBuffer() does not check buffer size with "-1". It allocates the buffer directly and so the error "Negative buffer resize: -1" is thrown. ### Component(s) C++, Java -- 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: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org