MCPcopy Create free account
hub / github.com/ByConity/ByConity / addEmptyBlock

Method addEmptyBlock

src/IO/ZstdDeflatingAppendableWriteBuffer.cpp:165–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void ZstdDeflatingAppendableWriteBuffer::addEmptyBlock()
166{
167 /// HACK: https://github.com/facebook/zstd/issues/2090#issuecomment-620158967
168 if (out.buffer().size() - out.offset() < ZSTD_CORRECT_TERMINATION_LAST_BLOCK.size())
169 out.next();
170
171 std::memcpy(out.buffer().begin() + out.offset(), ZSTD_CORRECT_TERMINATION_LAST_BLOCK.data(), ZSTD_CORRECT_TERMINATION_LAST_BLOCK.size());
172
173 out.position() = out.buffer().begin() + out.offset() + ZSTD_CORRECT_TERMINATION_LAST_BLOCK.size();
174}
175
176bool ZstdDeflatingAppendableWriteBuffer::isNeedToAddEmptyBlock()
177{

Callers

nothing calls this directly

Calls 8

memcpyFunction · 0.85
bufferMethod · 0.80
sizeMethod · 0.45
offsetMethod · 0.45
nextMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected