mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
commit
b8345f209f
@ -1,5 +1,6 @@
|
||||
#include <IO/LZMADeflatingWriteBuffer.h>
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -123,3 +124,5 @@ void LZMADeflatingWriteBuffer::finish()
|
||||
} while (lstr.avail_out == 0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -3,10 +3,16 @@
|
||||
#include <IO/BufferWithOwnMemory.h>
|
||||
#include <IO/WriteBuffer.h>
|
||||
|
||||
#include <lzma.h>
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
#include <lzma.h> // Y_IGNORE
|
||||
#endif
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
|
||||
/// Performs compression using lzma library and writes compressed data to out_ WriteBuffer.
|
||||
class LZMADeflatingWriteBuffer : public BufferWithOwnMemory<WriteBuffer>
|
||||
{
|
||||
@ -29,4 +35,27 @@ private:
|
||||
lzma_stream lstr;
|
||||
bool finished = false;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
class LZMADeflatingWriteBuffer : public BufferWithOwnMemory<WriteBuffer>
|
||||
{
|
||||
public:
|
||||
LZMADeflatingWriteBuffer(
|
||||
std::unique_ptr<WriteBuffer> out_ [[maybe_unused]],
|
||||
int compression_level [[maybe_unused]],
|
||||
size_t buf_size [[maybe_unused]] = DBMS_DEFAULT_BUFFER_SIZE,
|
||||
char * existing_memory [[maybe_unused]] = nullptr,
|
||||
size_t alignment [[maybe_unused]] = 0)
|
||||
{
|
||||
throw Exception("LZMADeflatingWriteBuffer is not implemented for arcadia build", ErrorCodes::NOT_IMPLEMENTED);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <IO/LZMAInflatingReadBuffer.h>
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
namespace DB
|
||||
{
|
||||
namespace ErrorCodes
|
||||
@ -87,3 +88,4 @@ bool LZMAInflatingReadBuffer::nextImpl()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -3,14 +3,14 @@
|
||||
#include <IO/BufferWithOwnMemory.h>
|
||||
#include <IO/ReadBuffer.h>
|
||||
|
||||
#include <lzma.h>
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
#include <lzma.h> // Y_IGNORE
|
||||
#endif
|
||||
|
||||
namespace DB
|
||||
{
|
||||
namespace ErrorCodes
|
||||
{
|
||||
}
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
class LZMAInflatingReadBuffer : public BufferWithOwnMemory<ReadBuffer>
|
||||
{
|
||||
public:
|
||||
@ -30,4 +30,26 @@ private:
|
||||
|
||||
bool eof;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
class LZMAInflatingReadBuffer : public BufferWithOwnMemory<ReadBuffer>
|
||||
{
|
||||
public:
|
||||
LZMAInflatingReadBuffer(
|
||||
std::unique_ptr<ReadBuffer> in_ [[maybe_unused]],
|
||||
size_t buf_size [[maybe_unused]] = DBMS_DEFAULT_BUFFER_SIZE,
|
||||
char * existing_memory [[maybe_unused]] = nullptr,
|
||||
size_t alignment [[maybe_unused]] = 0)
|
||||
{
|
||||
throw Exception("LZMADeflatingWriteBuffer is not implemented for arcadia build", ErrorCodes::NOT_IMPLEMENTED);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user