coderex2522 commented on code in PR #1275:
URL: https://github.com/apache/orc/pull/1275#discussion_r1002666769
##########
c++/src/Compression.cc:
##########
@@ -138,19 +147,44 @@ namespace orc {
static_cast<uint64_t>(outputSize - outputPosition);
}
+ void CompressionStreamBase::writeData(const unsigned char* data, int size) {
Review Comment:
done.
##########
c++/src/Compression.cc:
##########
@@ -138,19 +147,44 @@ namespace orc {
static_cast<uint64_t>(outputSize - outputPosition);
}
+ void CompressionStreamBase::writeData(const unsigned char* data, int size) {
+ int offset = 0;
+ while (offset < size) {
+ if (outputPosition == outputSize) {
+ if (!BufferedOutputStream::Next(
+ reinterpret_cast<void **>(&outputBuffer),
+ &outputSize)) {
+ throw std::runtime_error(
+ "Failed to get next output buffer from output stream.");
+ }
+ outputPosition = 0;
+ } else if (outputPosition > outputSize) {
+ // this will unlikely happen, but we have seen a few on zstd v1.1.0
Review Comment:
done.
--
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]