aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.com>2024-06-10 10:07:19 +0300
committeriddqd <iddqd@yandex-team.com>2024-06-10 11:40:16 +0300
commit0f8b43a2792f618dce8711696ce5e394e7f3933d (patch)
treeb3b1b6c020161e906fde4712471c07d9e18ff5ef
parent520001ecb8d8d5362f41e7db2b4ad5aab5afd8e6 (diff)
downloadydb-0f8b43a2792f618dce8711696ce5e394e7f3933d.tar.gz
Do not use minilzo and quicklz in open source. Export it to github.
d4d08d59dfff0c48a950a3faa36be4ac7e060912
-rw-r--r--library/cpp/streams/factory/open_by_file_extension/factory.cpp76
-rw-r--r--library/cpp/streams/factory/open_by_file_extension/factory.h50
-rw-r--r--library/cpp/streams/factory/open_by_file_extension/factory_ut.cpp83
-rw-r--r--library/cpp/streams/factory/open_by_file_extension/ut/ya.make7
-rw-r--r--library/cpp/streams/factory/open_by_file_extension/ya.make16
-rw-r--r--library/cpp/streams/factory/open_by_signature/factory.cpp99
-rw-r--r--library/cpp/streams/factory/open_by_signature/factory.h37
-rw-r--r--library/cpp/streams/factory/open_by_signature/factory_ut.cpp86
-rw-r--r--library/cpp/streams/factory/open_by_signature/ut/ya.make11
-rw-r--r--library/cpp/streams/factory/open_by_signature/ya.make17
-rw-r--r--library/cpp/streams/factory/open_common/factory.cpp19
-rw-r--r--library/cpp/streams/factory/open_common/factory.h13
-rw-r--r--library/cpp/streams/factory/open_common/ya.make12
-rw-r--r--library/cpp/streams/factory/ya.make6
-rw-r--r--library/cpp/streams/lz/common/compressor.h386
-rw-r--r--library/cpp/streams/lz/lz.cpp132
-rw-r--r--library/cpp/streams/lz/lz.h8
-rw-r--r--library/cpp/streams/lz/lz4/block.h35
-rw-r--r--library/cpp/streams/lz/lz4/lz4.cpp5
-rw-r--r--library/cpp/streams/lz/lz4/ya.make11
-rw-r--r--library/cpp/streams/lz/lz_ut.cpp300
-rw-r--r--library/cpp/streams/lz/minilzo.h6
-rw-r--r--library/cpp/streams/lz/quicklz.h6
-rw-r--r--library/cpp/streams/lz/snappy/block.h37
-rw-r--r--library/cpp/streams/lz/snappy/snappy.cpp5
-rw-r--r--library/cpp/streams/lz/snappy/ya.make11
-rw-r--r--library/cpp/streams/lz/ut/random.databin0 -> 8196 bytes
-rw-r--r--library/cpp/streams/lz/ut/request.data1
-rw-r--r--library/cpp/streams/lz/ut/ya.make17
-rw-r--r--library/cpp/streams/lz/ut/yq_609.databin0 -> 721 bytes
-rw-r--r--library/cpp/streams/lz/ya.make31
31 files changed, 1523 insertions, 0 deletions
diff --git a/library/cpp/streams/factory/open_by_file_extension/factory.cpp b/library/cpp/streams/factory/open_by_file_extension/factory.cpp
new file mode 100644
index 0000000000..8836f3cdcd
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_file_extension/factory.cpp
@@ -0,0 +1,76 @@
+#include "factory.h"
+
+#include <library/cpp/streams/bzip2/bzip2.h>
+#include <library/cpp/streams/factory/open_common/factory.h>
+#include <util/stream/holder.h>
+#include <util/stream/file.h>
+#include <util/stream/output.h>
+#include <util/stream/zlib.h>
+#include <util/system/file.h>
+#include <util/generic/ptr.h>
+#include <util/generic/string.h>
+#include <util/generic/store_policy.h>
+
+namespace {
+ template <class T, class TDecoder>
+ class TCompressed: public TEmbedPolicy<T>, public TDecoder {
+ public:
+ template <class C>
+ inline TCompressed(const C& c)
+ : TEmbedPolicy<T>(c)
+ , TDecoder(TEmbedPolicy<T>::Ptr())
+ {
+ }
+
+ template <class C>
+ inline TCompressed(const C& c, size_t compressionLevel, size_t buflen)
+ : TEmbedPolicy<T>(c)
+ , TDecoder(this->Ptr(), compressionLevel, buflen)
+ {
+ }
+
+ ~TCompressed() override {
+ }
+ };
+
+ class TGZipCompress: public TZLibCompress {
+ public:
+ TGZipCompress(IOutputStream* output)
+ : TZLibCompress(output, ZLib::GZip)
+ {
+ }
+
+ TGZipCompress(IOutputStream* output, size_t compressionLevel, size_t buflen)
+ : TZLibCompress(output, ZLib::GZip, compressionLevel, buflen)
+ {
+ }
+ };
+}
+
+THolder<IInputStream> OpenInput(const TString& url) {
+ if (!url || url == TStringBuf("-")) {
+ return OpenStdin();
+ }
+
+ if (url.EndsWith(TStringBuf(".gz"))) {
+ return MakeHolder<TCompressed<TFileInput, TBufferedZLibDecompress>>(url);
+ }
+
+ if (url.EndsWith(TStringBuf(".bz2"))) {
+ return MakeHolder<TCompressed<TFileInput, TBZipDecompress>>(url);
+ }
+
+ return MakeHolder<TFileInput>(url);
+}
+
+THolder<IOutputStream> OpenOutput(const TString& url, ECompression compressionLevel, size_t buflen) {
+ if (!url || url == TStringBuf("-")) {
+ return MakeHolder<TFileOutput>(Duplicate(1));
+ } else if (url.EndsWith(TStringBuf(".gz"))) {
+ return MakeHolder<TCompressed<TFileOutput, TGZipCompress>>(url, size_t(compressionLevel), buflen);
+ } else if (url.EndsWith(TStringBuf(".bz2"))) {
+ return MakeHolder<TCompressed<TFileOutput, TBZipCompress>>(url, size_t(compressionLevel), buflen);
+ }
+
+ return MakeHolder<TFileOutput>(url);
+}
diff --git a/library/cpp/streams/factory/open_by_file_extension/factory.h b/library/cpp/streams/factory/open_by_file_extension/factory.h
new file mode 100644
index 0000000000..1e38726f56
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_file_extension/factory.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <util/generic/fwd.h>
+#include <util/generic/ptr.h>
+#include <util/stream/fwd.h>
+#include <util/stream/output.h> // IOutputStream type must be complete to destroy in THolder below
+
+/**
+ * Convenience function for opening an input file passed as one of program
+ * arguments. Handles `-` as standard input, and creates a decompressing stream
+ * for `gz` and `bz2` files.
+ *
+ * @param url File to open.
+ */
+THolder<IInputStream> OpenInput(const TString& url);
+
+enum class ECompression {
+ L1 = 1,
+ L2,
+ L3,
+ L4,
+ L5,
+ L6,
+ L7,
+ L8,
+ L9,
+ FAST = 1,
+ DEFAULT = 6,
+ BEST = 9
+};
+
+/**
+ * Convenience function for opening an output file passed as one of program
+ * arguments. Handles `-` as standard output, and creates a compressing stream
+ * for `gz` and `bz2` files with given compression level and buffer size.
+ *
+ * @param url File to open.
+ * @param compression_level Compression level.
+ * @param buflen Compression buffer length in bytes.
+ */
+THolder<IOutputStream> OpenOutput(const TString& url, ECompression compressionLevel, size_t buflen);
+
+inline THolder<IOutputStream> OpenOutput(const TString& url, ECompression compressionLevel) {
+ return ::OpenOutput(url, compressionLevel, 8 * 1024);
+}
+
+inline THolder<IOutputStream> OpenOutput(const TString& url) {
+ return ::OpenOutput(url, ECompression::DEFAULT);
+}
+
diff --git a/library/cpp/streams/factory/open_by_file_extension/factory_ut.cpp b/library/cpp/streams/factory/open_by_file_extension/factory_ut.cpp
new file mode 100644
index 0000000000..dbe1007491
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_file_extension/factory_ut.cpp
@@ -0,0 +1,83 @@
+#include "factory.h"
+
+#include <library/cpp/testing/unittest/registar.h>
+
+#include <util/generic/buffer.h>
+#include <util/generic/string.h>
+#include <util/generic/vector.h>
+#include <util/stream/buffer.h>
+#include <util/stream/file.h>
+#include <util/stream/mem.h>
+#include <util/stream/zlib.h>
+#include <util/system/env.h>
+
+static const TString plain = "aaaaaaaaaaabbbbbbbbbbbdddddd22222222000000aldkfa9s3jsfkjlkja909090909090q3lkjalkjf3aldjl";
+
+static const ui8 gz[] = {31, 139, 8, 8, 126, 193, 203, 80, 0, 3, 97, 46, 116, 120, 116, 0, 75, 76, 132, 131, 36, 4, 72, 1, 3, 35, 40, 48, 0, 131, 196, 156, 148, 236, 180, 68, 203, 98, 227, 172, 226, 180, 236, 172, 156, 236, 172, 68, 75, 3, 4, 44, 52, 6, 137, 0, 113, 154, 49, 80, 97, 86, 14, 0, 5, 203, 67, 131, 88, 0, 0, 0};
+static const auto gzLength = Y_ARRAY_SIZE(gz);
+
+static const ui8 gzLvl6[] = {31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 76, 132, 131, 36, 4, 72, 1, 3, 35, 40, 48, 0, 131, 196, 156, 148, 236, 180, 68, 203, 98, 227, 172, 226, 180, 236, 172, 156, 236, 172, 68, 75, 3, 4, 44, 52, 6, 137, 0, 113, 154, 49, 80, 97, 86, 14, 0, 5, 203, 67, 131, 88, 0, 0, 0};
+static const auto gzLvl6Length = Y_ARRAY_SIZE(gzLvl6);
+
+static const ui8 bz2[] = {66, 90, 104, 57, 49, 65, 89, 38, 83, 89, 140, 92, 215, 106, 0, 0, 17, 73, 128, 20, 128, 88, 32, 53, 28, 40, 0, 32, 0, 84, 66, 52, 211, 0, 6, 72, 122, 140, 131, 36, 97, 60, 92, 230, 1, 71, 91, 170, 135, 33, 135, 149, 133, 75, 174, 153, 146, 217, 24, 174, 177, 76, 246, 69, 254, 225, 195, 236, 95, 180, 93, 201, 20, 225, 66, 66, 49, 115, 93, 168};
+static const auto bz2Length = Y_ARRAY_SIZE(bz2);
+
+static const ui8 bz2Lvl6[] = {66, 90, 104, 54, 49, 65, 89, 38, 83, 89, 140, 92, 215, 106, 0, 0, 17, 73, 128, 20, 128, 88, 32, 53, 28, 40, 0, 32, 0, 84, 66, 52, 211, 0, 6, 72, 122, 140, 131, 36, 97, 60, 92, 230, 1, 71, 91, 170, 135, 33, 135, 149, 133, 75, 174, 153, 146, 217, 24, 174, 177, 76, 246, 69, 254, 225, 195, 236, 95, 180, 93, 201, 20, 225, 66, 66, 49, 115, 93, 168};
+static const auto bz2Lvl6Length = Y_ARRAY_SIZE(bz2Lvl6);
+
+Y_UNIT_TEST_SUITE(TRecognizeCompressorTest) {
+ Y_UNIT_TEST(TestOpenInput) {
+ const auto fileName = TString("test_open_input.file");
+ TFileOutput{fileName}.Write(plain);
+ UNIT_ASSERT_VALUES_EQUAL(OpenInput(fileName)->ReadAll(), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenInputZlib) {
+ const auto fileName = TString("test_open_input_zlib.file.gz");
+ TFileOutput{fileName}.Write(gz, gzLength);
+ UNIT_ASSERT_VALUES_EQUAL(OpenInput(fileName)->ReadAll(), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenInputBZ2) {
+ const auto fileName = TString("test_open_input_bz2.file.bz2");
+ TFileOutput{fileName}.Write(bz2, bz2Length);
+ UNIT_ASSERT_VALUES_EQUAL(OpenInput(fileName)->ReadAll(), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenOutput) {
+ const auto fileName = TString("test_open_output.file");
+ OpenOutput(fileName)->Write(plain);
+ UNIT_ASSERT_VALUES_EQUAL(TFileInput{fileName}.ReadAll(), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenOutputZlib) {
+ const auto fileName = TString("test_open_output_zlib.file.gz");
+ OpenOutput(fileName)->Write(plain);
+ const auto expected = TStringBuf{(const char*)gzLvl6, gzLvl6Length};
+ UNIT_ASSERT_VALUES_EQUAL(TFileInput{fileName}.ReadAll(), expected);
+ }
+
+ Y_UNIT_TEST(TestOpenOutputBZ2) {
+ const auto fileName = TString("test_open_output_bz2.file.bz2");
+ OpenOutput(fileName)->Write(plain);
+ const auto expected = TStringBuf{(const char*)bz2Lvl6, bz2Lvl6Length};
+ UNIT_ASSERT_VALUES_EQUAL(TFileInput{fileName}.ReadAll(), expected);
+ }
+
+ static void TestReadWrite(const TString& fileName, const TString& data) {
+ OpenOutput(fileName)->Write(data.data(), data.size());
+ UNIT_ASSERT_VALUES_EQUAL(OpenInput(fileName)->ReadAll(), data);
+ }
+
+ Y_UNIT_TEST(TestOpenInputOpenOutputSimple) {
+ TestReadWrite(TString("test_open_input_open_output.file"), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenInputOpenOutputZLib) {
+ TestReadWrite(TString("test_open_input_open_output_zlib.file.gz"), plain);
+ }
+
+ Y_UNIT_TEST(TestOpenInputOpenOutputBZ2) {
+ TestReadWrite(TString("test_open_input_open_output_bz2.file.bz2"), plain);
+ }
+}
diff --git a/library/cpp/streams/factory/open_by_file_extension/ut/ya.make b/library/cpp/streams/factory/open_by_file_extension/ut/ya.make
new file mode 100644
index 0000000000..bc0b55ee25
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_file_extension/ut/ya.make
@@ -0,0 +1,7 @@
+UNITTEST_FOR(library/cpp/streams/factory/open_by_file_extension)
+
+SRCS(
+ factory_ut.cpp
+)
+
+END()
diff --git a/library/cpp/streams/factory/open_by_file_extension/ya.make b/library/cpp/streams/factory/open_by_file_extension/ya.make
new file mode 100644
index 0000000000..add354e7c3
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_file_extension/ya.make
@@ -0,0 +1,16 @@
+LIBRARY()
+
+PEERDIR(
+ library/cpp/streams/bzip2
+ library/cpp/streams/factory/open_common
+)
+
+SRCS(
+ factory.cpp
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/library/cpp/streams/factory/open_by_signature/factory.cpp b/library/cpp/streams/factory/open_by_signature/factory.cpp
new file mode 100644
index 0000000000..2c96015f42
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_signature/factory.cpp
@@ -0,0 +1,99 @@
+#include "factory.h"
+
+#include <library/cpp/streams/bzip2/bzip2.h>
+#include <library/cpp/streams/factory/open_common/factory.h>
+#include <util/stream/holder.h>
+#include <util/stream/file.h>
+#include <library/cpp/streams/lz/lz.h>
+#include <util/stream/str.h>
+#include <util/stream/zlib.h>
+#include <util/stream/multi.h>
+#include <util/generic/ptr.h>
+#include <util/generic/string.h>
+
+namespace {
+ template <class T>
+ struct TInputHolderX: public T {
+ inline decltype(T().Get()) Set(T t) noexcept {
+ t.Swap(*this);
+
+ return this->Get();
+ }
+ };
+
+ template <class T>
+ struct TInputHolderX<T*> {
+ static inline T* Set(T* t) noexcept {
+ return t;
+ }
+ };
+
+ template <class TInput>
+ struct TStringMultiInput: private TInputHolderX<TInput>, private TString, private THolder<IInputStream>, public TMultiInput {
+ TStringMultiInput(const TString& head, TInput tail)
+ : TString(head)
+ , THolder<IInputStream>(new TStringInput(*this))
+ , TMultiInput(THolder<IInputStream>::Get(), this->Set(tail))
+ {
+ }
+
+ ~TStringMultiInput() override {
+ }
+ };
+}
+
+template <class TInput>
+THolder<IInputStream> OpenMaybeCompressedInputX(TInput input) {
+ const size_t MAX_SIGNATURE_SIZE = 4;
+ char buffer[MAX_SIGNATURE_SIZE];
+ TString header(buffer, input->Load(buffer, MAX_SIGNATURE_SIZE));
+
+ if (header.size() == MAX_SIGNATURE_SIZE) {
+ // any lz
+ THolder<IInputStream> lz = TryOpenOwnedLzDecompressor(new TStringMultiInput<TInput>(header, input));
+
+ if (lz.Get()) {
+ return lz;
+ }
+ }
+
+ THolder<IInputStream> multi(new TStringMultiInput<TInput>(header, input));
+
+ // gzip
+ const TStringBuf GZIP = "\x1F\x8B";
+ const TStringBuf ZLIB = "\x78\x9C";
+
+ if (header.StartsWith(GZIP) || header.StartsWith(ZLIB)) {
+ return MakeHolder<THoldingStream<TBufferedZLibDecompress>>(std::move(multi));
+ }
+
+ // bzip2
+ constexpr TStringBuf BZIP2 = "BZ";
+ if (header.StartsWith(BZIP2)) {
+ return MakeHolder<THoldingStream<TBZipDecompress>>(std::move(multi));
+ }
+
+ return multi;
+}
+
+THolder<IInputStream> OpenMaybeCompressedInput(IInputStream* input) {
+ return OpenMaybeCompressedInputX(input);
+}
+
+THolder<IInputStream> OpenOwnedMaybeCompressedInput(THolder<IInputStream> input) {
+ return OpenMaybeCompressedInputX(TAtomicSharedPtr<IInputStream>(input));
+}
+
+THolder<IInputStream> OpenMaybeCompressedInput(const TString& path) {
+ if (!path || path == TStringBuf("-")) {
+ return OpenOwnedMaybeCompressedInput(OpenStdin());
+ }
+ return OpenOwnedMaybeCompressedInput(MakeHolder<TFileInput>(path));
+}
+
+THolder<IInputStream> OpenMaybeCompressedInput(const TString& path, ui32 bufSize) {
+ if (!path || path == TStringBuf("-")) {
+ return OpenOwnedMaybeCompressedInput(OpenStdin(bufSize));
+ }
+ return OpenOwnedMaybeCompressedInput(MakeHolder<TFileInput>(path, bufSize));
+}
diff --git a/library/cpp/streams/factory/open_by_signature/factory.h b/library/cpp/streams/factory/open_by_signature/factory.h
new file mode 100644
index 0000000000..7f5288bda2
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_signature/factory.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <util/generic/fwd.h>
+#include <util/generic/ptr.h>
+#include <util/stream/fwd.h>
+
+/**
+ * Peeks into the provided input stream to determine its compression format,
+ * if any, and returns a corresponding decompressing stream. If the stream is
+ * not compressed, then returns a simple pass-through proxy stream.
+ *
+ * Note that returned stream doesn't own the provided input stream, thus it's
+ * up to the user to free them both.
+ *
+ * @param input Input stream.
+ * @returns Newly constructed stream.
+ */
+THolder<IInputStream> OpenMaybeCompressedInput(IInputStream* input);
+
+/**
+ * Same as `OpenMaybeCompressedInput`, but returned stream owns the one passed
+ * into this function.
+ *
+ * @param input Input stream.
+ * @returns Newly constructed stream.
+ * @see OpenMaybeCompressedInput(IInputStream*)
+ */
+THolder<IInputStream> OpenOwnedMaybeCompressedInput(THolder<IInputStream> input);
+
+/**
+ * @param input Input stream.
+ * @returns Newly constructed stream.
+ * @see OpenMaybeCompressedInput(IInputStream*)
+ */
+THolder<IInputStream> OpenMaybeCompressedInput(const TString& path);
+
+THolder<IInputStream> OpenMaybeCompressedInput(const TString& path, ui32 bufSize);
diff --git a/library/cpp/streams/factory/open_by_signature/factory_ut.cpp b/library/cpp/streams/factory/open_by_signature/factory_ut.cpp
new file mode 100644
index 0000000000..fead0be0e3
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_signature/factory_ut.cpp
@@ -0,0 +1,86 @@
+#include "factory.h"
+
+#include <library/cpp/streams/lz/lz.h>
+
+#include <library/cpp/testing/unittest/registar.h>
+
+#include <util/generic/buffer.h>
+#include <util/generic/string.h>
+#include <util/generic/vector.h>
+#include <util/stream/buffer.h>
+#include <util/stream/file.h>
+#include <util/stream/mem.h>
+#include <util/stream/zlib.h>
+#include <util/system/env.h>
+
+static const TString plain = "aaaaaaaaaaabbbbbbbbbbbdddddd22222222000000aldkfa9s3jsfkjlkja909090909090q3lkjalkjf3aldjl";
+
+static const ui8 gz[] = {31, 139, 8, 8, 126, 193, 203, 80, 0, 3, 97, 46, 116, 120, 116, 0, 75, 76, 132, 131, 36, 4, 72, 1, 3, 35, 40, 48, 0, 131, 196, 156, 148, 236, 180, 68, 203, 98, 227, 172, 226, 180, 236, 172, 156, 236, 172, 68, 75, 3, 4, 44, 52, 6, 137, 0, 113, 154, 49, 80, 97, 86, 14, 0, 5, 203, 67, 131, 88, 0, 0, 0};
+static const auto gzLength = Y_ARRAY_SIZE(gz);
+
+static const ui8 bz2[] = {66, 90, 104, 57, 49, 65, 89, 38, 83, 89, 140, 92, 215, 106, 0, 0, 17, 73, 128, 20, 128, 88, 32, 53, 28, 40, 0, 32, 0, 84, 66, 52, 211, 0, 6, 72, 122, 140, 131, 36, 97, 60, 92, 230, 1, 71, 91, 170, 135, 33, 135, 149, 133, 75, 174, 153, 146, 217, 24, 174, 177, 76, 246, 69, 254, 225, 195, 236, 95, 180, 93, 201, 20, 225, 66, 66, 49, 115, 93, 168};
+static const auto bz2Length = Y_ARRAY_SIZE(bz2);
+
+Y_UNIT_TEST_SUITE(TRecognizeCompressorTest) {
+ static void TestRawData(const void* data, size_t len, const TString& orig) {
+ TMemoryInput mem(data, len);
+
+ THolder<IInputStream> input = OpenMaybeCompressedInput(&mem);
+ UNIT_ASSERT_VALUES_UNEQUAL(input.Get(), nullptr);
+ UNIT_ASSERT_VALUES_EQUAL(input->ReadAll(), orig);
+ }
+
+ static void TestRawDataOwned(const void* data, size_t len, const TString& orig) {
+ THolder<IInputStream> input = OpenOwnedMaybeCompressedInput(MakeHolder<TMemoryInput>(data, len));
+ UNIT_ASSERT_VALUES_UNEQUAL(input.Get(), nullptr);
+ UNIT_ASSERT_VALUES_EQUAL(input->ReadAll(), orig);
+ }
+
+ static inline void TestSame(const TString& text) {
+ TestRawData(text.data(), text.size(), text);
+ TestRawDataOwned(text.data(), text.size(), text);
+ }
+
+ Y_UNIT_TEST(TestPlain) {
+ TestSame(plain);
+ TestSame("");
+ TestSame("a");
+ TestSame("ab");
+ TestSame("abc");
+ TestSame("abcd");
+ }
+
+ Y_UNIT_TEST(TestGzip) {
+ TestRawData(gz, gzLength, plain);
+ TestRawDataOwned(gz, gzLength, plain);
+ }
+
+ Y_UNIT_TEST(TestBzip2) {
+ TestRawData(bz2, bz2Length, plain);
+ TestRawDataOwned(bz2, bz2Length, plain);
+ }
+
+ template <typename TCompress>
+ static void TestCompress() {
+ TBufferStream buf;
+ {
+ TCompress z(&buf);
+ z.Write(plain.data(), plain.size());
+ }
+ TestRawData(buf.Buffer().Data(), buf.Buffer().Size(), plain);
+ }
+
+ Y_UNIT_TEST(TestLz) {
+ TestCompress<TLz4Compress>();
+ TestCompress<TSnappyCompress>();
+#ifndef OPENSOURCE
+ TestCompress<TLzoCompress>();
+ TestCompress<TLzqCompress>();
+#endif
+ TestCompress<TLzfCompress>();
+ }
+
+ Y_UNIT_TEST(TestZlib) {
+ TestCompress<TZLibCompress>();
+ }
+}
diff --git a/library/cpp/streams/factory/open_by_signature/ut/ya.make b/library/cpp/streams/factory/open_by_signature/ut/ya.make
new file mode 100644
index 0000000000..ea1695293e
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_signature/ut/ya.make
@@ -0,0 +1,11 @@
+UNITTEST_FOR(library/cpp/streams/factory/open_by_signature)
+
+IF(OPENSOURCE)
+ CFLAGS(-DOPENSOURCE)
+ENDIF()
+
+SRCS(
+ factory_ut.cpp
+)
+
+END()
diff --git a/library/cpp/streams/factory/open_by_signature/ya.make b/library/cpp/streams/factory/open_by_signature/ya.make
new file mode 100644
index 0000000000..ed72269488
--- /dev/null
+++ b/library/cpp/streams/factory/open_by_signature/ya.make
@@ -0,0 +1,17 @@
+LIBRARY()
+
+PEERDIR(
+ library/cpp/streams/bzip2
+ library/cpp/streams/factory/open_common
+ library/cpp/streams/lz
+)
+
+SRCS(
+ factory.cpp
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/library/cpp/streams/factory/open_common/factory.cpp b/library/cpp/streams/factory/open_common/factory.cpp
new file mode 100644
index 0000000000..c99ac44121
--- /dev/null
+++ b/library/cpp/streams/factory/open_common/factory.cpp
@@ -0,0 +1,19 @@
+#include "factory.h"
+
+#include <util/stream/file.h>
+#include <util/system/file.h>
+#include <util/generic/ptr.h>
+
+#ifdef _win_ // isatty
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+THolder<IInputStream> OpenStdin(size_t bufSize) {
+ if (isatty(0)) {
+ return MakeHolder<TUnbufferedFileInput>(Duplicate(0));
+ }
+ return MakeHolder<TFileInput>(Duplicate(0), bufSize);
+}
+
diff --git a/library/cpp/streams/factory/open_common/factory.h b/library/cpp/streams/factory/open_common/factory.h
new file mode 100644
index 0000000000..5477d0969a
--- /dev/null
+++ b/library/cpp/streams/factory/open_common/factory.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <util/generic/fwd.h>
+#include <util/generic/ptr.h>
+#include <util/stream/fwd.h>
+
+/**
+ * Convenience function for opening standard input.
+ *
+ * @param bufSize Buffer size.
+ */
+THolder<IInputStream> OpenStdin(size_t bufSize = 1 << 13);
+
diff --git a/library/cpp/streams/factory/open_common/ya.make b/library/cpp/streams/factory/open_common/ya.make
new file mode 100644
index 0000000000..725dbd05b9
--- /dev/null
+++ b/library/cpp/streams/factory/open_common/ya.make
@@ -0,0 +1,12 @@
+LIBRARY()
+
+PEERDIR(
+ library/cpp/streams/bzip2
+)
+
+SRCS(
+ factory.cpp
+)
+
+END()
+
diff --git a/library/cpp/streams/factory/ya.make b/library/cpp/streams/factory/ya.make
new file mode 100644
index 0000000000..12c90f8cbc
--- /dev/null
+++ b/library/cpp/streams/factory/ya.make
@@ -0,0 +1,6 @@
+RECURSE(
+ open_by_file_extension
+ open_by_signature
+ open_common
+)
+
diff --git a/library/cpp/streams/lz/common/compressor.h b/library/cpp/streams/lz/common/compressor.h
new file mode 100644
index 0000000000..ebff84694c
--- /dev/null
+++ b/library/cpp/streams/lz/common/compressor.h
@@ -0,0 +1,386 @@
+#pragma once
+
+#include <util/system/yassert.h>
+#include <util/system/byteorder.h>
+#include <util/memory/addstorage.h>
+#include <util/generic/buffer.h>
+#include <util/generic/utility.h>
+#include <util/generic/singleton.h>
+#include <util/stream/mem.h>
+
+#include "error.h"
+
+static inline ui8 HostToLittle(ui8 t) noexcept {
+ return t;
+}
+
+static inline ui8 LittleToHost(ui8 t) noexcept {
+ return t;
+}
+
+struct TCommonData {
+ static const size_t overhead = sizeof(ui16) + sizeof(ui8);
+};
+
+const size_t SIGNATURE_SIZE = 4;
+
+template <class TCompressor, class TBase>
+class TCompressorBase: public TAdditionalStorage<TCompressorBase<TCompressor, TBase>>, public TCompressor, public TCommonData {
+public:
+ inline TCompressorBase(IOutputStream* slave, ui16 blockSize)
+ : Slave_(slave)
+ , BlockSize_(blockSize)
+ {
+ /*
+ * save signature
+ */
+ static_assert(sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE");
+ Slave_->Write(TCompressor::signature, sizeof(TCompressor::signature) - 1);
+
+ /*
+ * save version
+ */
+ this->Save((ui32)1);
+
+ /*
+ * save block size
+ */
+ this->Save(BlockSize());
+ }
+
+ inline ~TCompressorBase() {
+ }
+
+ inline void Write(const char* buf, size_t len) {
+ while (len) {
+ const ui16 toWrite = (ui16)Min<size_t>(len, this->BlockSize());
+
+ this->WriteBlock(buf, toWrite);
+
+ buf += toWrite;
+ len -= toWrite;
+ }
+ }
+
+ inline void Flush() {
+ }
+
+ inline void Finish() {
+ this->Flush();
+ this->WriteBlock(nullptr, 0);
+ }
+
+ template <class T>
+ static inline void Save(T t, IOutputStream* out) {
+ t = HostToLittle(t);
+
+ out->Write(&t, sizeof(t));
+ }
+
+ template <class T>
+ inline void Save(T t) {
+ Save(t, Slave_);
+ }
+
+private:
+ inline void* Block() const noexcept {
+ return this->AdditionalData();
+ }
+
+ inline ui16 BlockSize() const noexcept {
+ return BlockSize_;
+ }
+
+ inline void WriteBlock(const void* ptr, ui16 len) {
+ Y_ASSERT(len <= this->BlockSize());
+
+ ui8 compressed = false;
+
+ if (len) {
+ const size_t out = this->Compress((const char*)ptr, len, (char*)Block(), this->AdditionalDataLength());
+ // catch compressor buffer overrun (e.g. SEARCH-2043)
+ //Y_ABORT_UNLESS(out <= this->Hint(this->BlockSize()));
+
+ if (out < len || TCompressor::SaveIncompressibleChunks()) {
+ compressed = true;
+ ptr = Block();
+ len = (ui16)out;
+ }
+ }
+
+ char tmp[overhead];
+ TMemoryOutput header(tmp, sizeof(tmp));
+
+ this->Save(len, &header);
+ this->Save(compressed, &header);
+
+ using TPart = IOutputStream::TPart;
+ if (ptr) {
+ const TPart parts[] = {
+ TPart(tmp, sizeof(tmp)),
+ TPart(ptr, len),
+ };
+
+ Slave_->Write(parts, sizeof(parts) / sizeof(*parts));
+ } else {
+ Slave_->Write(tmp, sizeof(tmp));
+ }
+ }
+
+private:
+ IOutputStream* Slave_;
+ const ui16 BlockSize_;
+};
+
+template <class T>
+static inline T GLoad(IInputStream* input) {
+ T t;
+
+ if (input->Load(&t, sizeof(t)) != sizeof(t)) {
+ ythrow TDecompressorError() << "stream error";
+ }
+
+ return LittleToHost(t);
+}
+
+class TDecompressSignature {
+public:
+ inline TDecompressSignature(IInputStream* input) {
+ if (input->Load(Buffer_, SIGNATURE_SIZE) != SIGNATURE_SIZE) {
+ ythrow TDecompressorError() << "can not load stream signature";
+ }
+ }
+
+ template <class TDecompressor>
+ inline bool Check() const {
+ static_assert(sizeof(TDecompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TDecompressor::signature) - 1 == SIGNATURE_SIZE");
+ return memcmp(TDecompressor::signature, Buffer_, SIGNATURE_SIZE) == 0;
+ }
+
+private:
+ char Buffer_[SIGNATURE_SIZE];
+};
+
+template <class TDecompressor>
+static inline IInputStream* ConsumeSignature(IInputStream* input) {
+ TDecompressSignature sign(input);
+ if (!sign.Check<TDecompressor>()) {
+ ythrow TDecompressorError() << "incorrect signature";
+ }
+ return input;
+}
+
+template <class TDecompressor>
+class TDecompressorBaseImpl: public TDecompressor, public TCommonData {
+public:
+ static inline ui32 CheckVer(ui32 v) {
+ if (v != 1) {
+ ythrow yexception() << TStringBuf("incorrect stream version: ") << v;
+ }
+
+ return v;
+ }
+
+ inline TDecompressorBaseImpl(IInputStream* slave)
+ : Slave_(slave)
+ , Input_(nullptr, 0)
+ , Eof_(false)
+ , Version_(CheckVer(Load<ui32>()))
+ , BlockSize_(Load<ui16>())
+ , OutBufSize_(TDecompressor::Hint(BlockSize_))
+ , Tmp_(2 * OutBufSize_)
+ , In_(Tmp_.Data())
+ , Out_(In_ + OutBufSize_)
+ {
+ this->InitFromStream(Slave_);
+ }
+
+ inline ~TDecompressorBaseImpl() {
+ }
+
+ inline size_t Read(void* buf, size_t len) {
+ size_t ret = Input_.Read(buf, len);
+
+ if (ret) {
+ return ret;
+ }
+
+ if (Eof_) {
+ return 0;
+ }
+
+ this->FillNextBlock();
+
+ ret = Input_.Read(buf, len);
+
+ if (ret) {
+ return ret;
+ }
+
+ Eof_ = true;
+
+ return 0;
+ }
+
+ inline void FillNextBlock() {
+ char tmp[overhead];
+
+ if (Slave_->Load(tmp, sizeof(tmp)) != sizeof(tmp)) {
+ ythrow TDecompressorError() << "can not read block header";
+ }
+
+ TMemoryInput header(tmp, sizeof(tmp));
+
+ const ui16 len = GLoad<ui16>(&header);
+ if (len > Tmp_.Capacity()) {
+ ythrow TDecompressorError() << "invalid len inside block header";
+ }
+ const ui8 compressed = GLoad<ui8>(&header);
+
+ if (compressed > 1) {
+ ythrow TDecompressorError() << "broken header";
+ }
+
+ if (Slave_->Load(In_, len) != len) {
+ ythrow TDecompressorError() << "can not read data";
+ }
+
+ if (compressed) {
+ const size_t ret = this->Decompress(In_, len, Out_, OutBufSize_);
+
+ Input_.Reset(Out_, ret);
+ } else {
+ Input_.Reset(In_, len);
+ }
+ }
+
+ template <class T>
+ inline T Load() {
+ return GLoad<T>(Slave_);
+ }
+
+protected:
+ IInputStream* Slave_;
+ TMemoryInput Input_;
+ bool Eof_;
+ const ui32 Version_;
+ const ui16 BlockSize_;
+ const size_t OutBufSize_;
+ TBuffer Tmp_;
+ char* In_;
+ char* Out_;
+};
+
+template <class TDecompressor, class TBase>
+class TDecompressorBase: public TDecompressorBaseImpl<TDecompressor> {
+public:
+ inline TDecompressorBase(IInputStream* slave)
+ : TDecompressorBaseImpl<TDecompressor>(ConsumeSignature<TDecompressor>(slave))
+ {
+ }
+
+ inline ~TDecompressorBase() {
+ }
+};
+
+#define DEF_COMPRESSOR_COMMON(rname, name) \
+ rname::~rname() { \
+ try { \
+ Finish(); \
+ } catch (...) { \
+ } \
+ } \
+ \
+ void rname::DoWrite(const void* buf, size_t len) { \
+ if (!Impl_) { \
+ ythrow yexception() << "can not write to finalized stream"; \
+ } \
+ \
+ Impl_->Write((const char*)buf, len); \
+ } \
+ \
+ void rname::DoFlush() { \
+ if (!Impl_) { \
+ ythrow yexception() << "can not flush finalized stream"; \
+ } \
+ \
+ Impl_->Flush(); \
+ } \
+ \
+ void rname::DoFinish() { \
+ THolder<TImpl> impl(Impl_.Release()); \
+ \
+ if (impl) { \
+ impl->Finish(); \
+ } \
+ }
+
+#define DEF_COMPRESSOR(rname, name) \
+ class rname::TImpl: public TCompressorBase<name, TImpl> { \
+ public: \
+ inline TImpl(IOutputStream* out, ui16 blockSize) \
+ : TCompressorBase<name, TImpl>(out, blockSize) { \
+ } \
+ }; \
+ \
+ rname::rname(IOutputStream* slave, ui16 blockSize) \
+ : Impl_(new (TImpl::Hint(blockSize)) TImpl(slave, blockSize)) { \
+ } \
+ \
+ DEF_COMPRESSOR_COMMON(rname, name)
+
+#define DEF_DECOMPRESSOR(rname, name) \
+ class rname::TImpl: public TDecompressorBase<name, TImpl> { \
+ public: \
+ inline TImpl(IInputStream* in) \
+ : TDecompressorBase<name, TImpl>(in) { \
+ } \
+ }; \
+ \
+ rname::rname(IInputStream* slave) \
+ : Impl_(new TImpl(slave)) { \
+ } \
+ \
+ rname::~rname() { \
+ } \
+ \
+ size_t rname::DoRead(void* buf, size_t len) { \
+ return Impl_->Read(buf, len); \
+ }
+
+template <class T>
+struct TInputHolder {
+ static inline T Set(T t) noexcept {
+ return t;
+ }
+};
+
+template <class T>
+struct TInputHolder<TAutoPtr<T>> {
+ inline T* Set(TAutoPtr<T> v) noexcept {
+ V_ = v;
+
+ return V_.Get();
+ }
+
+ TAutoPtr<T> V_;
+};
+
+
+// Decompressing input streams without signature verification
+template <class TInput, class TDecompressor>
+class TLzDecompressInput: public TInputHolder<TInput>, public IInputStream {
+public:
+ inline TLzDecompressInput(TInput in)
+ : Impl_(this->Set(in))
+ {
+ }
+
+private:
+ size_t DoRead(void* buf, size_t len) override {
+ return Impl_.Read(buf, len);
+ }
+
+private:
+ TDecompressorBaseImpl<TDecompressor> Impl_;
+};
diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp
new file mode 100644
index 0000000000..46c5f50e2d
--- /dev/null
+++ b/library/cpp/streams/lz/lz.cpp
@@ -0,0 +1,132 @@
+#include "lz.h"
+
+#include <util/system/yassert.h>
+#include <util/system/byteorder.h>
+#include <util/memory/addstorage.h>
+#include <util/generic/buffer.h>
+#include <util/generic/utility.h>
+#include <util/generic/singleton.h>
+#include <util/generic/yexception.h>
+#include <util/stream/mem.h>
+
+#include <library/cpp/streams/lz/common/compressor.h>
+
+#include <library/cpp/streams/lz/lz4/block.h>
+#include <library/cpp/streams/lz/snappy/block.h>
+
+#include <contrib/libs/fastlz/fastlz.h>
+
+#ifndef OPENSOURCE
+#include "minilzo.h"
+#include "quicklz.h"
+#endif
+
+/*
+ * FastLZ
+ */
+class TFastLZ {
+public:
+ static const char signature[];
+
+ 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 fastlz_compress(data, len, ptr);
+ }
+
+ inline size_t Decompress(const char* data, size_t len, char* ptr, size_t max) {
+ return fastlz_decompress(data, len, ptr, max);
+ }
+
+ inline void InitFromStream(IInputStream*) const noexcept {
+ }
+
+ static inline bool SaveIncompressibleChunks() noexcept {
+ return false;
+ }
+};
+
+const char TFastLZ::signature[] = "YLZF";
+
+DEF_COMPRESSOR(TLzfCompress, TFastLZ)
+DEF_DECOMPRESSOR(TLzfDecompress, TFastLZ)
+
+template <class T>
+static TAutoPtr<IInputStream> TryOpenLzDecompressorX(const TDecompressSignature& s, T input) {
+ if (s.Check<TLZ4>())
+ return new TLzDecompressInput<T, TLZ4>(input);
+
+ if (s.Check<TSnappy>())
+ return new TLzDecompressInput<T, TSnappy>(input);
+
+#ifndef OPENSOURCE
+ if (auto result = TryOpenMiniLzoDecompressor(s, input))
+ return result;
+#endif
+
+ if (s.Check<TFastLZ>())
+ return new TLzDecompressInput<T, TFastLZ>(input);
+
+#ifndef OPENSOURCE
+ if (auto result = TryOpenQuickLzDecompressor(s, input))
+ return result;
+#endif
+
+ return nullptr;
+}
+
+template <class T>
+static inline TAutoPtr<IInputStream> TryOpenLzDecompressorImpl(const TStringBuf& signature, T input) {
+ if (signature.size() == SIGNATURE_SIZE) {
+ TMemoryInput mem(signature.data(), signature.size());
+ TDecompressSignature s(&mem);
+
+ return TryOpenLzDecompressorX(s, input);
+ }
+
+ return nullptr;
+}
+
+template <class T>
+static inline TAutoPtr<IInputStream> TryOpenLzDecompressorImpl(T input) {
+ TDecompressSignature s(&*input);
+
+ return TryOpenLzDecompressorX(s, input);
+}
+
+template <class T>
+static inline TAutoPtr<IInputStream> OpenLzDecompressorImpl(T input) {
+ TAutoPtr<IInputStream> ret = TryOpenLzDecompressorImpl(input);
+
+ if (!ret) {
+ ythrow TDecompressorError() << "Unknown compression format";
+ }
+
+ return ret;
+}
+
+TAutoPtr<IInputStream> OpenLzDecompressor(IInputStream* input) {
+ return OpenLzDecompressorImpl(input);
+}
+
+TAutoPtr<IInputStream> TryOpenLzDecompressor(IInputStream* input) {
+ return TryOpenLzDecompressorImpl(input);
+}
+
+TAutoPtr<IInputStream> TryOpenLzDecompressor(const TStringBuf& signature, IInputStream* input) {
+ return TryOpenLzDecompressorImpl(signature, input);
+}
+
+TAutoPtr<IInputStream> OpenOwnedLzDecompressor(TAutoPtr<IInputStream> input) {
+ return OpenLzDecompressorImpl(input);
+}
+
+TAutoPtr<IInputStream> TryOpenOwnedLzDecompressor(TAutoPtr<IInputStream> input) {
+ return TryOpenLzDecompressorImpl(input);
+}
+
+TAutoPtr<IInputStream> TryOpenOwnedLzDecompressor(const TStringBuf& signature, TAutoPtr<IInputStream> input) {
+ return TryOpenLzDecompressorImpl(signature, input);
+}
diff --git a/library/cpp/streams/lz/lz.h b/library/cpp/streams/lz/lz.h
index 2124d8b4bc..64536a0d52 100644
--- a/library/cpp/streams/lz/lz.h
+++ b/library/cpp/streams/lz/lz.h
@@ -27,6 +27,8 @@
* @{
*/
+#ifndef OPENSOURCE
+
/**
* MiniLZO compressing stream.
*/
@@ -61,6 +63,8 @@ private:
THolder<TImpl> Impl_;
};
+#endif
+
/**
* FastLZ compressing stream.
*/
@@ -95,6 +99,8 @@ private:
THolder<TImpl> Impl_;
};
+#ifndef OPENSOURCE
+
/**
* QuickLZ compressing stream.
*/
@@ -147,6 +153,8 @@ private:
THolder<TImpl> Impl_;
};
+#endif
+
/** @} */
/**
diff --git a/library/cpp/streams/lz/lz4/block.h b/library/cpp/streams/lz/lz4/block.h
new file mode 100644
index 0000000000..9a912c0be2
--- /dev/null
+++ b/library/cpp/streams/lz/lz4/block.h
@@ -0,0 +1,35 @@
+#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;
+ }
+};
diff --git a/library/cpp/streams/lz/lz4/lz4.cpp b/library/cpp/streams/lz/lz4/lz4.cpp
new file mode 100644
index 0000000000..220e358c07
--- /dev/null
+++ b/library/cpp/streams/lz/lz4/lz4.cpp
@@ -0,0 +1,5 @@
+#include "lz4.h"
+#include "block.h"
+
+DEF_COMPRESSOR(TLz4Compress, TLZ4)
+DEF_DECOMPRESSOR(TLz4Decompress, TLZ4)
diff --git a/library/cpp/streams/lz/lz4/ya.make b/library/cpp/streams/lz/lz4/ya.make
new file mode 100644
index 0000000000..162fe68632
--- /dev/null
+++ b/library/cpp/streams/lz/lz4/ya.make
@@ -0,0 +1,11 @@
+LIBRARY()
+
+PEERDIR(
+ contrib/libs/lz4
+)
+
+SRCS(
+ lz4.cpp
+)
+
+END()
diff --git a/library/cpp/streams/lz/lz_ut.cpp b/library/cpp/streams/lz/lz_ut.cpp
new file mode 100644
index 0000000000..17df533225
--- /dev/null
+++ b/library/cpp/streams/lz/lz_ut.cpp
@@ -0,0 +1,300 @@
+#include "lz.h"
+
+#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/resource/resource.h>
+
+#include <util/stream/file.h>
+#include <util/generic/vector.h>
+#include <util/system/tempfile.h>
+#include <util/generic/singleton.h>
+
+#define LDATA "./ldata"
+#define LDATA_RANDOM "./ldata.random"
+
+static const TString data = "aa aaa aa aaa aa aaa bb bbb bb bbb bb bbb";
+
+namespace {
+ /**
+ * Produces well-formed random crap
+ **/
+ TString RandomString(size_t size) {
+ TString entropy(NResource::Find("/random.data"));
+ TString result;
+ size_t seed = 1;
+ size_t j = 0;
+ for (size_t i = 0; i < size; ++i) {
+ seed *= 3;
+ char sym;
+ do {
+ sym = char((seed ^ i) % 256);
+ if (!sym) {
+ seed += 1;
+ }
+ } while (!sym);
+ Y_ASSERT(sym);
+ j = (j + 1) % entropy.size();
+ result += char(sym + entropy[j]);
+ }
+ return result;
+ }
+
+ TVector<TString> InitRandomData() {
+ static const TVector<size_t> sizes = {
+ 0,
+ 1,
+ 127,
+ 2017,
+ 32767,
+ };
+
+ TVector<TString> result;
+ for (auto size : sizes) {
+ result.push_back(RandomString(size));
+ }
+ result.push_back(NResource::Find("/request.data"));
+ return result;
+ }
+
+ TString TestFileName(const TString& d, size_t bufferSize) {
+ return LDATA_RANDOM + TString(".") + ToString(d.size()) + TString(".") + ToString(bufferSize);
+ }
+
+ struct TRandomData: public TVector<TString> {
+ inline TRandomData() {
+ InitRandomData().swap(*this);
+ }
+ };
+}
+
+static const TVector<size_t> bufferSizes = {
+ 127,
+ 1024,
+ 32768,
+};
+
+#ifndef OPENSOURCE
+namespace {
+ template <TLzqCompress::EVersion Ver, int Level, TLzqCompress::EMode Mode>
+ struct TLzqCompressX: public TLzqCompress {
+ inline TLzqCompressX(IOutputStream* out, size_t bufLen)
+ : TLzqCompress(out, bufLen, Ver, Level, Mode)
+ {
+ }
+ };
+}
+#endif
+
+template <class C>
+static inline void TestGoodDataCompress() {
+ TFixedBufferFileOutput o(LDATA);
+ C c(&o, 1024);
+
+ TString d = data;
+
+ for (size_t i = 0; i < 10; ++i) {
+ c.Write(d.data(), d.size());
+ c << Endl;
+ d = d + d;
+ }
+
+ c.Finish();
+ o.Finish();
+}
+
+template <class C>
+static inline void TestIncompressibleDataCompress(const TString& d, size_t bufferSize) {
+ TString testFileName = TestFileName(d, bufferSize);
+ TFixedBufferFileOutput o(testFileName);
+ C c(&o, bufferSize);
+ c.Write(d.data(), d.size());
+ c.Finish();
+ o.Finish();
+}
+
+template <class C>
+static inline void TestCompress() {
+ TestGoodDataCompress<C>();
+ for (auto bufferSize : bufferSizes) {
+ for (auto rd : *Singleton<TRandomData>()) {
+ TestIncompressibleDataCompress<C>(rd, bufferSize);
+ }
+ }
+}
+
+template <class D>
+static inline void TestGoodDataDecompress() {
+ TTempFile tmpFile(LDATA);
+
+ {
+ TFileInput i1(LDATA);
+ D ld(&i1);
+
+ TString d = data;
+
+ for (size_t i2 = 0; i2 < 10; ++i2) {
+ UNIT_ASSERT_EQUAL(ld.ReadLine(), d);
+
+ d = d + d;
+ }
+ }
+}
+
+template <class D>
+static inline void TestIncompressibleDataDecompress(const TString& d, size_t bufferSize) {
+ TString testFileName = TestFileName(d, bufferSize);
+ TTempFile tmpFile(testFileName);
+
+ {
+ TFileInput i(testFileName);
+ D ld(&i);
+
+ UNIT_ASSERT_EQUAL(ld.ReadAll(), d);
+ }
+}
+
+template <class D>
+static inline void TestDecompress() {
+ TestGoodDataDecompress<D>();
+ for (auto bufferSize : bufferSizes) {
+ for (auto rd : *Singleton<TRandomData>()) {
+ TestIncompressibleDataDecompress<D>(rd, bufferSize);
+ }
+ }
+}
+
+class TMixedDecompress: public IInputStream {
+public:
+ TMixedDecompress(IInputStream* input)
+ : Slave_(OpenLzDecompressor(input).Release())
+ {
+ }
+
+private:
+ size_t DoRead(void* buf, size_t len) override {
+ return Slave_->Read(buf, len);
+ }
+
+private:
+ THolder<IInputStream> Slave_;
+};
+
+template <class C>
+static inline void TestMixedDecompress() {
+ TestCompress<C>();
+ TestDecompress<TMixedDecompress>();
+}
+
+template <class D, class C>
+static inline void TestDecompressError() {
+ TestCompress<C>();
+ UNIT_ASSERT_EXCEPTION(TestDecompress<D>(), TDecompressorError);
+}
+
+Y_UNIT_TEST_SUITE(TLzTest) {
+
+#ifndef OPENSOURCE
+ Y_UNIT_TEST(TestLzo) {
+ TestCompress<TLzoCompress>();
+ TestDecompress<TLzoDecompress>();
+ }
+#endif
+
+ Y_UNIT_TEST(TestLzf) {
+ TestCompress<TLzfCompress>();
+ TestDecompress<TLzfDecompress>();
+ }
+
+#ifndef OPENSOURCE
+ Y_UNIT_TEST(TestLzq) {
+ TestCompress<TLzqCompress>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq151_1) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 1, TLzqCompress::M_0>>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq151_2) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 2, TLzqCompress::M_100000>>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq151_3) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_51, 3, TLzqCompress::M_1000000>>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq140_1) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 1, TLzqCompress::M_0>>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq140_2) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 2, TLzqCompress::M_100000>>();
+ TestDecompress<TLzqDecompress>();
+ }
+
+ Y_UNIT_TEST(TestLzq140_3) {
+ TestCompress<TLzqCompressX<TLzqCompress::V_1_40, 3, TLzqCompress::M_1000000>>();
+ TestDecompress<TLzqDecompress>();
+ }
+#endif
+
+ Y_UNIT_TEST(TestLz4) {
+ TestCompress<TLz4Compress>();
+ TestDecompress<TLz4Decompress>();
+ }
+
+ Y_UNIT_TEST(TestSnappy) {
+ TestCompress<TSnappyCompress>();
+ TestDecompress<TSnappyDecompress>();
+ }
+
+ Y_UNIT_TEST(TestGeneric) {
+#ifndef OPENSOURCE
+ TestMixedDecompress<TLzoCompress>();
+#endif
+ TestMixedDecompress<TLzfCompress>();
+#ifndef OPENSOURCE
+ TestMixedDecompress<TLzqCompress>();
+#endif
+ TestMixedDecompress<TLz4Compress>();
+ TestMixedDecompress<TSnappyCompress>();
+ }
+
+ Y_UNIT_TEST(TestDecompressorError) {
+#ifndef OPENSOURCE
+ TestDecompressError<TLzoDecompress, TLzfCompress>();
+ TestDecompressError<TLzfDecompress, TLzqCompress>();
+ TestDecompressError<TLzqDecompress, TLz4Compress>();
+#endif
+ TestDecompressError<TLz4Decompress, TSnappyCompress>();
+ TestDecompressError<TSnappyDecompress, TBufferedOutput>();
+ TestDecompressError<TMixedDecompress, TBufferedOutput>();
+ }
+
+ Y_UNIT_TEST(TestFactory) {
+ TStringStream ss;
+
+ {
+ TLz4Compress c(&ss);
+
+ c.Write("123456789", 9);
+ c.Finish();
+ }
+
+ TAutoPtr<IInputStream> is(OpenOwnedLzDecompressor(new TStringInput(ss.Str())));
+
+ UNIT_ASSERT_EQUAL(is->ReadAll(), "123456789");
+ }
+
+ Y_UNIT_TEST(TestYQ609) {
+ auto data = NResource::Find("/yq_609.data");
+
+ TMemoryInput input(data.Data(), data.Size());
+
+ TLz4Decompress d(&input);
+ UNIT_ASSERT_EXCEPTION(d.ReadAll(), TDecompressorError);
+ }
+}
diff --git a/library/cpp/streams/lz/minilzo.h b/library/cpp/streams/lz/minilzo.h
new file mode 100644
index 0000000000..8eddff3612
--- /dev/null
+++ b/library/cpp/streams/lz/minilzo.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include <library/cpp/streams/lz/common/compressor.h>
+
+TAutoPtr<IInputStream> TryOpenMiniLzoDecompressor(const TDecompressSignature& s, IInputStream* input);
+TAutoPtr<IInputStream> TryOpenMiniLzoDecompressor(const TDecompressSignature& s, TAutoPtr<IInputStream>& input);
diff --git a/library/cpp/streams/lz/quicklz.h b/library/cpp/streams/lz/quicklz.h
new file mode 100644
index 0000000000..818cc2dc65
--- /dev/null
+++ b/library/cpp/streams/lz/quicklz.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include <library/cpp/streams/lz/common/compressor.h>
+
+TAutoPtr<IInputStream> TryOpenQuickLzDecompressor(const TDecompressSignature& s, IInputStream* input);
+TAutoPtr<IInputStream> TryOpenQuickLzDecompressor(const TDecompressSignature& s, TAutoPtr<IInputStream>& input);
diff --git a/library/cpp/streams/lz/snappy/block.h b/library/cpp/streams/lz/snappy/block.h
new file mode 100644
index 0000000000..2a09a17dad
--- /dev/null
+++ b/library/cpp/streams/lz/snappy/block.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <library/cpp/streams/lz/common/compressor.h>
+
+#include <contrib/libs/snappy/snappy.h>
+
+/*
+ * Snappy
+ */
+class TSnappy {
+public:
+ static constexpr char signature[] = "Snap";
+
+ static inline size_t Hint(size_t len) noexcept {
+ return Max<size_t>(snappy::MaxCompressedLength(len), 100);
+ }
+
+ inline size_t Compress(const char* data, size_t len, char* ptr, size_t /*dstMaxSize*/) {
+ size_t reslen = 0;
+ snappy::RawCompress(data, len, ptr, &reslen);
+ return reslen;
+ }
+
+ inline size_t Decompress(const char* data, size_t len, char* ptr, size_t) {
+ size_t srclen = 0;
+ if (!snappy::GetUncompressedLength(data, len, &srclen) || !snappy::RawUncompress(data, len, ptr))
+ ythrow TDecompressorError();
+ return srclen;
+ }
+
+ inline void InitFromStream(IInputStream*) const noexcept {
+ }
+
+ static inline bool SaveIncompressibleChunks() noexcept {
+ return false;
+ }
+};
diff --git a/library/cpp/streams/lz/snappy/snappy.cpp b/library/cpp/streams/lz/snappy/snappy.cpp
new file mode 100644
index 0000000000..bdb27db9b6
--- /dev/null
+++ b/library/cpp/streams/lz/snappy/snappy.cpp
@@ -0,0 +1,5 @@
+#include "snappy.h"
+#include "block.h"
+
+DEF_COMPRESSOR(TSnappyCompress, TSnappy)
+DEF_DECOMPRESSOR(TSnappyDecompress, TSnappy)
diff --git a/library/cpp/streams/lz/snappy/ya.make b/library/cpp/streams/lz/snappy/ya.make
new file mode 100644
index 0000000000..a453f2d304
--- /dev/null
+++ b/library/cpp/streams/lz/snappy/ya.make
@@ -0,0 +1,11 @@
+LIBRARY()
+
+PEERDIR(
+ contrib/libs/snappy
+)
+
+SRCS(
+ snappy.cpp
+)
+
+END()
diff --git a/library/cpp/streams/lz/ut/random.data b/library/cpp/streams/lz/ut/random.data
new file mode 100644
index 0000000000..6b3c159b58
--- /dev/null
+++ b/library/cpp/streams/lz/ut/random.data
Binary files differ
diff --git a/library/cpp/streams/lz/ut/request.data b/library/cpp/streams/lz/ut/request.data
new file mode 100644
index 0000000000..6a29bfe6af
--- /dev/null
+++ b/library/cpp/streams/lz/ut/request.data
@@ -0,0 +1 @@
+pron=snipfactors&pron=grmult_QUICK_SAMOHOD_ON_MIDDLE%3Ad%3A0.1%3A0.1&pron=umrfull&pron=usemiddleownerdata&pron=onlyfastrank&pron=sortbyfastmn&pron=rtb2000000&pron=tbs120000&pron=multbs0.63&pron=versiontbs2&pron=wffrm_ru.fast.download&pron=whrm_ru.hast.download&pron=rcy-lzo&qtree=cHic7V0NdFXVlb7nvpuXxyFhXgNx4Z0ljURpYFkbwZlxaR2s80apf0VmlrVvqgNIgBRI4kuE6KxZTYJABIZg_VlqUSnIj2hfIAiEAAEELag479k1SrV1KuMvrXUW2pnxr875ufe-87PvvS_JKyrGtQzvvrP3vufs_e2zz88-5-ErcEmsKB4daVSgKrPaKDNsY7QxzhhvXFgSM-IG-d6oMqqNS4omFU02rjemRmejlch4ABlrkNGFjD3IIP8dQkYGzbBfQfgHmLPFCBsVVzztlqb6m6bNsFGFJ7ZYEGtMMqjY2Y8fOd0V67Io0quNC9ClDTEUN2yXYrRRRfiq0SQ0-S6T1M2YjVJXYLc0jkayd1xgTEHtSXNdenqM8NIXD5-OySfzG43kc2T6kLhpI_ejYaNv0I-zjWbzNjNmzi5uKG5BBqmbfbAUz1JaNyzbmunJbM4uIf-3ZZfTRqKKgFa-id1GKpxQW58pYY1VKEmb38SkyebktW6TVxVhhShuek03SFtN28x0sQbGicBYtj2zObM108u-YaXZDvZ5GPkczWyTyzLbnM-IfN4pfN7tfCaazC4UZK0QeLtzNPnI8eipnEU5Gqd-JeR7K7vQeUNJ3LItUtvdzpNBytq8t0QIV5v2di6hPbs8R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NXGZTOxNlr1Fkkh6x75c1yCZ-su7htj32cCo-BCewCjrK-_zDRxAR-gPBuCLfvV39i6Eb1QPijo_Q9TcELoPuXTn5d5RUY8LQs2V_KSoR6MPJM7GudJ4vr8mRNszgsxyVtM9qAefXZCwVwT9xlSIJ-T3G1NrtN-Y0n8BoVA_MTXw34QiKhrBVLST5lHd-vOmhL0B6acQs4uyLZJ-oB-KOvHpmd4pRMoAaec7_BAiLdb7hArMCgTHls2rw5XX_YRFJrGrRtYl7N8W8vdoFptaOne0uSlVM68GnMBCS4YHX77MG9NxVkgpd3HIOBQgYnjRwBetz4ZEaUvMyoTiBMI_UuehDTWpmfWpedPqfCYV0Pzzg3e9E28iP6SS-Xz-KVDparkGi-WFXkD2H_NT0BnUYWLlh38y389hMntDHabtrssFh8nsDXSYzF4fh8ns7aPDGORpKToTs19MKTs9huxy4j9fSxdPPOMv0ZUXVRjfpHWodmiIFhya08svfu22iWcYRstEXxq7nBZzGvxN-k81cmkshwaXU94zxuMbLtDkWN67ai--AnyXpcq5y06qcixBzv0N_xoix7_OVjzmyel48o_fPuPYvrGqnKhA89RzV4HvytH4vwvHsUMTKz990e_-FpKTozm9_J1ru0No_N9Fpj-hNPF43HsX03Pzm7ep7yKjBQ8_2bXVE8-Y1ZpVbUEisEfz4WcTQZoRAk3VDzsuVmnKHGzgWGxKNIbKzOsm8y-pYr0vJ5Mvh5MvS0jrhpIvi8mXkWsm1_BvaT3Eb4k__D_2jF58&rdba=clon&relev=ad_cat%3DO;ad_filtr%3D10;cl%3D2;cm2%3D0.0181118;cm%3D0.0869565;country%3Dru;ct%3D520-87%3A11886-13;dmoz_th%3D174-83%7C179-12;dnorm%3D32+autocad+bit+windows+xp+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_nav%3D32+autocad+bit+windows+xp+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_old%3D32+autocad+bit+windows+xp+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82;dnorm_w%3Dautoc+%D1%81%D0%BA%D0%B0%D1%87%D0%B0+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA+%D1%82%D0%BE%D1%80%D1%80%D0%B5+32+bit+%D0%B4%D0%BB%D1%8F+windo+xp;fe%3D6.48773;fir%3D0.267373;forum%3D0.59255;fqwg%3D5.218048216e-15;frqcls%3Dstrong_tail;fsm%3D177;fsml%3D11;geov%3D-0.000436704;hpq%3D0;iad%3D1;iad_vw%3D-33.57460785;il%3D0;ilp%3D0.001022;im%3D536870912;imgintent%3D0.56;is_music_ext%3D0.000;isorg%3D0.460;issite%3D0.460;issoft%3D0.750;ldatopicru%3D197;mum%3D0;mut%3D15;navmx%3D0.268605;norm%3Dautocad+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp;ow%3D52;prel%3D3;qc%3D3;qlu%3D1;qmpl%3Dru;qr2r%3D0;qr2u%3D1;qr2v%3D0;qrr%3D0;qru%3D1;qrv%3D0;qt%3Dru_nloc;relev_locale%3Dru;synnorm%3D32bit+autcad+pyc+winxp+%D1%82%D0%BE%D1%80%D0%B5%D0%BD%D1%82;syq%3D1.136661591e-07;th3561%3D0.0179;th3973%3D0.0682;topicality%3D36.0447;tvm%3D0.00222546;uil%3Dru;utq%3Ddownload+here+upon+russian+for+autodesk+inventor+auto+cad+%D0%B0%D0%B2%D1%82%D0%BE%D0%BA%D0%B0%D0%B4+autoca+pdf+torrent+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%B8%D1%82%D1%8C+feed+load+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B6%D0%B0%D1%82%D1%8C+%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%D1%81%D1%8F+%D1%81%D0%BA%D0%B0%D1%87%D0%BA%D0%B0+galloping+skachat+besplatno+free+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%B9+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%BA+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BD%D1%8B%D0%B9+%D0%B4%D0%B0%D1%80%D0%BE%D0%BC+gift+%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%BE+freely+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D0%BD%D0%BE+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BE+%D1%85%D0%B0%D0%BB%D1%8F%D0%B2%D0%BD%D1%8B%D0%B9+russia+%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9+rus+%D0%B2%D0%B5%D0%BB%D0%B8%D0%BA%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9+%D1%80%D1%83%D1%81%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0+%D1%80%D1%83%D1%81%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F+russification+%D1%80%D1%83%D1%81%D0%BA+%D1%80%D1%83%D1%81%D1%81+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D1%8B%D0%B9+russkom+%D0%B1%D0%B8%D1%82%D0%BD%D1%8B%D0%B9+%D1%83%D0%BA%D1%83%D1%81%D0%B8%D1%82%D1%8C+background+intelligent+transfer+service+%D0%B1%D0%B8%D1%82+bit+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D0%B2%D1%81+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D0%B7+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D1%81+windowsxp+windows+xtreme+performance+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE;vcomm%3D0.248625;vintent%3D0.95;vm%3D268435456;vnorm%3Dautocad+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp;vnorm_dopp%3D32+autocad+bit+windows+xp;vnorm_syn%3D32bit+autcad+winxp;vqi2tvec%3D1%7C0rkjACu_CrE81xPoE93gAB5X2uKgUsx_JvATChj78_A%2C;vqsemvec%3D371364212%091370421533%093362250591%092760956004;wizqbundle%3DehRMWi40AQAAAACAUzAB-F8KZipZehRMWi40AQAAAACARwAB8wYSXBJGEgdhdXRvY2FkGAAgAioMCggPAHNzEAAqDQoJDgAQJw8AJAsKLAAnEAEcAIRzJxAAIJMCKh0AoDICCAI4A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VItwlxw33WXVS/QOXwm0BjMdBWbgr%2BBvbnW7q6g7bu0n7uavXb5evgOcI1QG%2B7BLf8j7Fer27vKq1l51/dAN3xgV9J62WnlqqVGk78wDoVyr33isRd0FRfRXR61IYXNSvSj5t4BgTnXta%2Bjoq5W37sq476Tbg7l4qoP3k/lHpXM2VO7zdddI9zpd077VdnnrRhlY6eAa79BlRsXiidNwJVEU4uP4UnIX1exF4XJRJr1v/8wHtKdsDoCZ/uNv2HM5D%2Bak0fD;relevgeo%3D225;geochanged%3D1;;udbts%3D1459797057;downerprotobundle%3DCAwVQbwCVw%2C%2C&reqid=1461253060957657-600715567702129748010289-myt1-1909&snip=exps%3Dmarker_ratings_info%2Cmarker_movie_rating%3D0;report%3Dwww;reps%3Dall_on;snip_width%3D550;uil%3Dru;dqsigml%3D4&snip=t%3D0&text=%28autocad%3A%3A209750+^+autodesk%3A%3A288721+^+%28%28autodesk%3A%3A288721+%26/%281+1%29+inventor%3A%3A1697918%29%29+^+%28%28auto%3A%3A28861+%26/%281+1%29+cad%3A%3A171629%29%29+^+%D0%B0%D0%B2%D1%82%D0%BE%D0%BA%D0%B0%D0%B4%3A%3A1405467+^+autoca%3A%3A420234780%29+%26%26/%28-3+5%29+%28%28%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%3A%3A691+^+download%3A%3A13863+^+pdf%3A%3A10201+^+torrent%3A%3A35211+^+%28%28%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A456+%26/%281+1%29+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%B8%D1%82%D1%8C%3A%3A13856%29%29+^+%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B6%D0%B0%D1%82%D1%8C%3A%3A13856+^+%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%3A%3A112512+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%3A%3A14585+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%D1%81%D1%8F%3A%3A423410+^+%D1%81%D0%BA%D0%B0%D1%87%D0%BA%D0%B0%3A%3A152424+^+skachat%3A%3A203208%29+%26/%28-64+64%29+%28%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A456+^+besplatno%3A%3A455045+^+download%3A%3A13863+^+free%3A%3A12386+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%3A%3A886571+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%B9%3A%3A14490854+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%B8%D0%BA%3A%3A105058695+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BD%D1%8B%D0%B9%3A%3A280156520+^+%D0%B4%D0%B0%D1%80%D0%BE%D0%BC%3A%3A148126+^+%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%BE%3A%3A88910+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D0%BD%D0%BE%3A%3A4669275+^+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BE%3A%3A10775250+^+%D1%85%D0%B0%D0%BB%D1%8F%D0%B2%D0%BD%D1%8B%D0%B9%3A%3A644531%29%29+^+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%3A%3A17882331+%26/%28-64+64%29+%D0%BD%D0%B0%3A%3A131+%26/%28-64+64%29+%28%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC%3A%3A1942+^+russia%3A%3A37324+^+russian%3A%3A31805+^+%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9%3A%3A3887+^+rus%3A%3A16095+^+%D0%B2%D0%B5%D0%BB%D0%B8%D0%BA%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%3A%3A1918880+^+%D1%80%D1%83%D1%81%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0%3A%3A27111921+^+%D1%80%D1%83%D1%81%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F%3A%3A638169+^+!!%D1%80%D1%83%D1%81%D0%BA%3A%3A1076145+^+%D1%80%D1%83%D1%81%D1%81%3A%3A336053+^+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D1%8B%D0%B9%3A%3A139984+^+russkom%3A%3A7245427%29+%26%26/%28-3+5%29+%28%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82%3A%3A6178+^+torrent%3A%3A35211%29+%26%26/%28-3+5%29+32%3A%3A6178+%26/%28-1+1%29+%28bit%3A%3A27572+^+%D0%B1%D0%B8%D1%82%D0%BD%D1%8B%D0%B9%3A%3A414024+^+%D1%83%D0%BA%D1%83%D1%81%D0%B8%D1%82%D1%8C%3A%3A558080+^+%28%28background%3A%3A96185+%26/%281+1%29+intelligent%3A%3A705091+%26/%281+1%29+transfer%3A%3A180746+%26/%281+1%29+service%3A%3A17789%29%29+^+%D0%B1%D0%B8%D1%82%3A%3A65584%29+%26%26/%28-3+5%29+%D0%B4%D0%BB%D1%8F%3A%3A205+%26/%28-64+64%29+%28%28windows%3A%3A2869+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D0%B2%D1%81%3A%3A318239+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D0%B7%3A%3A17509782+^+%D0%B2%D0%B8%D0%BD%D0%B4%D0%BE%D1%83%D1%81%3A%3A2618285%29+%26%26/%28-3+5%29+%28xp%3A%3A13143+^+windows%3A%3A2869+^+%D1%85%D1%80%3A%3A278393+^+%28%28xtreme%3A%3A579234+%26/%281+1%29+performance%3A%3A113530%29%29+^+%D1%85%D0%BF%3A%3A582849%29%29+^+windowsxp%3A%3A585285+softness%3A6&tld=ru&uil=ru&user_request=autocad+%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE+%D0%BD%D0%B0+%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC+%D1%82%D0%BE%D1%80%D1%80%D0%B5%D0%BD%D1%82+32+bit+%D0%B4%D0%BB%D1%8F+windows+xp \ No newline at end of file
diff --git a/library/cpp/streams/lz/ut/ya.make b/library/cpp/streams/lz/ut/ya.make
new file mode 100644
index 0000000000..93a1a1d7d6
--- /dev/null
+++ b/library/cpp/streams/lz/ut/ya.make
@@ -0,0 +1,17 @@
+UNITTEST_FOR(library/cpp/streams/lz)
+
+RESOURCE(
+ random.data /random.data
+ request.data /request.data
+ yq_609.data /yq_609.data
+)
+
+IF(OPENSOURCE)
+ CFLAGS(-DOPENSOURCE)
+ENDIF()
+
+SRCS(
+ lz_ut.cpp
+)
+
+END()
diff --git a/library/cpp/streams/lz/ut/yq_609.data b/library/cpp/streams/lz/ut/yq_609.data
new file mode 100644
index 0000000000..9694b0c97f
--- /dev/null
+++ b/library/cpp/streams/lz/ut/yq_609.data
Binary files differ
diff --git a/library/cpp/streams/lz/ya.make b/library/cpp/streams/lz/ya.make
new file mode 100644
index 0000000000..92dff556eb
--- /dev/null
+++ b/library/cpp/streams/lz/ya.make
@@ -0,0 +1,31 @@
+LIBRARY()
+
+PEERDIR(
+ contrib/libs/fastlz
+
+ library/cpp/streams/lz/snappy
+ library/cpp/streams/lz/lz4
+)
+
+IF(OPENSOURCE)
+ CFLAGS(-DOPENSOURCE)
+ELSE()
+ PEERDIR(
+ contrib/libs/minilzo
+ contrib/libs/quicklz
+ )
+ SRCS(
+ minilzo.cpp
+ quicklz.cpp
+ )
+ENDIF()
+
+SRCS(
+ lz.cpp
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ ut
+)