ClickHouse/dbms/include/DB/IO/CompressedReadBuffer.h

34 lines
621 B
C++
Raw Normal View History

2011-11-18 20:17:27 +00:00
#pragma once
2010-06-04 18:25:25 +00:00
#include <DB/IO/CompressedReadBufferBase.h>
2016-10-25 06:49:24 +00:00
#include <DB/IO/BufferWithOwnMemory.h>
#include <DB/IO/ReadBuffer.h>
2010-06-04 18:25:25 +00:00
namespace DB
{
class CompressedReadBuffer : public CompressedReadBufferBase, public BufferWithOwnMemory<ReadBuffer>
2010-06-04 18:25:25 +00:00
{
private:
2014-07-22 10:35:24 +00:00
size_t size_compressed = 0;
2016-10-25 06:49:24 +00:00
bool nextImpl() override;
2011-06-26 21:30:59 +00:00
public:
CompressedReadBuffer(ReadBuffer & in_)
: CompressedReadBufferBase(&in_), BufferWithOwnMemory<ReadBuffer>(0)
{
}
2016-10-25 06:49:24 +00:00
size_t readBig(char * to, size_t n) override;
2014-07-22 10:35:24 +00:00
/// Сжатый размер текущего блока.
size_t getSizeCompressed() const
{
return size_compressed;
}
2010-06-04 18:25:25 +00:00
};
}