diff options
author | iddqd <iddqd@yandex-team.com> | 2024-06-07 13:22:53 +0300 |
---|---|---|
committer | iddqd <iddqd@yandex-team.com> | 2024-06-07 13:41:05 +0300 |
commit | 89aed776bc90bfaf56bab8fb2d4cd1a47a6c8c86 (patch) | |
tree | e209172bf3b27e9063a2f3f11020ea4586c11e56 /library/cpp/streams/lz/lz4/block.h | |
parent | 327232940ecda2082cbcd9551049456522bbaffe (diff) | |
download | ydb-89aed776bc90bfaf56bab8fb2d4cd1a47a6c8c86.tar.gz |
Revert commit rXXXXXX, temporary add library/cpp/streams/factory/open_by_signature to export
6c14e61e6b845e2aa92a25daf61de10267e9e8a0
Diffstat (limited to 'library/cpp/streams/lz/lz4/block.h')
-rw-r--r-- | library/cpp/streams/lz/lz4/block.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/library/cpp/streams/lz/lz4/block.h b/library/cpp/streams/lz/lz4/block.h deleted file mode 100644 index 9a912c0be2..0000000000 --- a/library/cpp/streams/lz/lz4/block.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include <library/cpp/streams/lz/common/compressor.h> - -#include <contrib/libs/lz4/lz4.h> - -/* - * LZ4 - */ -class TLZ4 { -public: - static constexpr char signature[]= "LZ.4"; - - static inline size_t Hint(size_t len) noexcept { - return Max<size_t>((size_t)(len * 1.06), 100); - } - - inline size_t Compress(const char* data, size_t len, char* ptr, size_t dstMaxSize) { - return LZ4_compress_default(data, ptr, len, dstMaxSize); - } - - inline size_t Decompress(const char* data, size_t len, char* ptr, size_t max) { - int res = LZ4_decompress_safe(data, ptr, len, max); - if (res < 0) - ythrow TDecompressorError(); - return res; - } - - inline void InitFromStream(IInputStream*) const noexcept { - } - - static inline bool SaveIncompressibleChunks() noexcept { - return false; - } -}; |