2021-08-06 23:55:04 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <IO/ReadBuffer.h>
|
2022-04-15 23:56:45 +00:00
|
|
|
#include <IO/CompressedReadBufferWrapper.h>
|
2021-08-06 23:55:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2022-04-15 23:56:45 +00:00
|
|
|
class Bzip2ReadBuffer : public CompressedReadBufferWrapper
|
2021-08-06 23:55:04 +00:00
|
|
|
{
|
|
|
|
public:
|
2022-03-13 11:59:20 +00:00
|
|
|
explicit Bzip2ReadBuffer(
|
2021-08-06 23:55:04 +00:00
|
|
|
std::unique_ptr<ReadBuffer> in_,
|
|
|
|
size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE,
|
|
|
|
char * existing_memory = nullptr,
|
|
|
|
size_t alignment = 0);
|
|
|
|
|
|
|
|
~Bzip2ReadBuffer() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool nextImpl() override;
|
|
|
|
|
|
|
|
class Bzip2StateWrapper;
|
|
|
|
std::unique_ptr<Bzip2StateWrapper> bz;
|
|
|
|
|
2021-12-30 04:47:34 +00:00
|
|
|
bool eof_flag;
|
2021-08-06 23:55:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|