1#pragma once
2
3#include "CompressedReadBufferBase.h"
4#include <IO/BufferWithOwnMemory.h>
5#include <IO/ReadBuffer.h>
6
7
8namespace DB
9{
10
11class CompressedReadBuffer : public CompressedReadBufferBase, public BufferWithOwnMemory<ReadBuffer>
12{
13private:
14 size_t size_compressed = 0;
15
16 bool nextImpl() override;
17
18public:
19 CompressedReadBuffer(ReadBuffer & in_)
20 : CompressedReadBufferBase(&in_), BufferWithOwnMemory<ReadBuffer>(0)
21 {
22 }
23
24 size_t readBig(char * to, size_t n) override;
25
26 /// The compressed size of the current block.
27 size_t getSizeCompressed() const
28 {
29 return size_compressed;
30 }
31};
32
33}
34