mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
32 lines
551 B
C++
32 lines
551 B
C++
#pragma once
|
|
|
|
#include <IO/BufferWithOwnMemory.h>
|
|
#include <IO/ReadBuffer.h>
|
|
|
|
#include <lzma.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class LZMAInflatingReadBuffer : public BufferWithOwnMemory<ReadBuffer>
|
|
{
|
|
public:
|
|
LZMAInflatingReadBuffer(
|
|
std::unique_ptr<ReadBuffer> in_,
|
|
size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE,
|
|
char * existing_memory = nullptr,
|
|
size_t alignment = 0);
|
|
|
|
~LZMAInflatingReadBuffer() override;
|
|
|
|
private:
|
|
bool nextImpl() override;
|
|
|
|
std::unique_ptr<ReadBuffer> in;
|
|
lzma_stream lstr;
|
|
|
|
bool eof;
|
|
};
|
|
|
|
}
|