MCPcopy Create free account
hub / github.com/apache/orc / Next

Method Next

c++/src/Compression.cc:253–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 }
252
253 bool CompressionStream::Next(void** data, int* size) {
254 if (rawInputBuffer.size() > compressionBlockSize) {
255 std::stringstream ss;
256 ss << "uncompressed data size " << rawInputBuffer.size()
257 << " is larger than compression block size " << compressionBlockSize;
258 throw CompressionError(ss.str());
259 }
260
261 // compress data in the rawInputBuffer when it is full
262 if (rawInputBuffer.size() == compressionBlockSize) {
263 compressInternal();
264 }
265
266 auto block = rawInputBuffer.getNextBlock();
267 *data = block.data;
268 *size = static_cast<int>(block.size);
269 return true;
270 }
271
272 class ZlibCompressionStream : public CompressionStream {
273 public:

Callers 15

TEST_FFunction · 0.45
TESTFunction · 0.45
decompressAndVerifyFunction · 0.45
compressAndVerifyFunction · 0.45
TESTFunction · 0.45
readByteMethod · 0.45
readByteMethod · 0.45
readFullyFunction · 0.45
nextMethod · 0.45
readBufferMethod · 0.45
resetBufferStartMethod · 0.45

Calls 5

CompressionErrorClass · 0.85
getNextBlockMethod · 0.80
sizeMethod · 0.65
dataMethod · 0.45
resizeMethod · 0.45

Tested by 6

TEST_FFunction · 0.36
TESTFunction · 0.36
decompressAndVerifyFunction · 0.36
compressAndVerifyFunction · 0.36
TESTFunction · 0.36