ClickHouse/src/IO/CompressedReadBufferWrapper.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
660 B
C++
Raw Normal View History

2022-04-15 23:56:45 +00:00
#pragma once
#include <IO/BufferWithOwnMemory.h>
#include <IO/ReadBuffer.h>
namespace DB
{
class CompressedReadBufferWrapper : public BufferWithOwnMemory<ReadBuffer>
{
public:
CompressedReadBufferWrapper(
std::unique_ptr<ReadBuffer> in_,
size_t buf_size,
char * existing_memory,
size_t alignment)
: BufferWithOwnMemory<ReadBuffer>(buf_size, existing_memory, alignment)
, in(std::move(in_)) {}
const ReadBuffer & getWrappedReadBuffer() const { return *in; }
2022-04-26 12:57:02 +00:00
ReadBuffer & getWrappedReadBuffer() { return *in; }
2022-04-15 23:56:45 +00:00
2022-04-25 08:48:08 +00:00
void prefetch() override { in->prefetch(); }
2022-04-15 23:56:45 +00:00
protected:
std::unique_ptr<ReadBuffer> in;
};
}