mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
28 lines
630 B
C++
28 lines
630 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Compression/CompressedReadBufferBase.h>
|
||
|
#include <IO/BufferWithOwnMemory.h>
|
||
|
#include <IO/ReadBuffer.h>
|
||
|
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
/** A buffer for reading from a compressed file with just checking checksums of
|
||
|
* the compressed blocks, without any decompression.
|
||
|
*/
|
||
|
class CheckingCompressedReadBuffer : public CompressedReadBufferBase, public ReadBuffer
|
||
|
{
|
||
|
protected:
|
||
|
bool nextImpl() override;
|
||
|
|
||
|
public:
|
||
|
CheckingCompressedReadBuffer(ReadBuffer & in_, bool allow_different_codecs_ = false)
|
||
|
: CompressedReadBufferBase(&in_, allow_different_codecs_)
|
||
|
, ReadBuffer(nullptr, 0)
|
||
|
{
|
||
|
}
|
||
|
};
|
||
|
|
||
|
}
|