2018-12-28 17:26:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CompressedReadBufferBase.h"
|
|
|
|
#include <IO/BufferWithOwnMemory.h>
|
|
|
|
#include <IO/ReadBuffer.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class CompressedReadBuffer : public CompressedReadBufferBase, public BufferWithOwnMemory<ReadBuffer>
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
size_t size_compressed = 0;
|
|
|
|
|
|
|
|
bool nextImpl() override;
|
|
|
|
|
|
|
|
public:
|
2021-01-06 00:24:42 +00:00
|
|
|
CompressedReadBuffer(ReadBuffer & in_, bool allow_different_codecs_ = false)
|
|
|
|
: CompressedReadBufferBase(&in_, allow_different_codecs_), BufferWithOwnMemory<ReadBuffer>(0)
|
2018-12-28 17:26:10 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t readBig(char * to, size_t n) override;
|
|
|
|
|
|
|
|
/// The compressed size of the current block.
|
|
|
|
size_t getSizeCompressed() const
|
|
|
|
{
|
|
|
|
return size_compressed;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|