MCPcopy Create free account
hub / github.com/apache/impala / Uncompress

Method Uncompress

be/src/kudu/util/compression/compression_codec.cc:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 }
176
177 Status Uncompress(const Slice& compressed,
178 uint8_t *uncompressed,
179 size_t uncompressed_length) const OVERRIDE {
180 int n = LZ4_decompress_safe(reinterpret_cast<const char *>(compressed.data()),
181 reinterpret_cast<char *>(uncompressed),
182 compressed.size(), uncompressed_length);
183 if (n != uncompressed_length) {
184 return Status::Corruption(
185 StringPrintf("unable to uncompress the buffer. error near %d, buffer", -n),
186 KUDU_REDACT(compressed.ToDebugString(100)));
187 }
188 return Status::OK();
189 }
190
191 size_t MaxCompressedLength(size_t source_bytes) const OVERRIDE {
192 return LZ4_compressBound(source_bytes);

Callers 2

TestCompressionCodecFunction · 0.45
BenchmarkFunction · 0.45

Calls 6

CorruptionFunction · 0.85
StringPrintfFunction · 0.85
OKFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
ToDebugStringMethod · 0.45

Tested by 2

TestCompressionCodecFunction · 0.36
BenchmarkFunction · 0.36