aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ucompress/writer.h
diff options
context:
space:
mode:
authorvitalyisaev <vitalyisaev@ydb.tech>2023-11-30 13:26:22 +0300
committervitalyisaev <vitalyisaev@ydb.tech>2023-11-30 15:44:45 +0300
commit0a98fece5a9b54f16afeb3a94b3eb3105e9c3962 (patch)
tree291d72dbd7e9865399f668c84d11ed86fb190bbf /library/cpp/ucompress/writer.h
parentcb2c8d75065e5b3c47094067cb4aa407d4813298 (diff)
downloadydb-0a98fece5a9b54f16afeb3a94b3eb3105e9c3962.tar.gz
YQ Connector:Use docker-compose in integrational tests
Diffstat (limited to 'library/cpp/ucompress/writer.h')
-rw-r--r--library/cpp/ucompress/writer.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/library/cpp/ucompress/writer.h b/library/cpp/ucompress/writer.h
new file mode 100644
index 0000000000..4d3ae71093
--- /dev/null
+++ b/library/cpp/ucompress/writer.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <util/generic/buffer.h>
+#include <util/stream/output.h>
+
+
+namespace NBlockCodecs {
+ struct ICodec;
+}
+
+namespace NUCompress {
+ class TCodedOutput: public IOutputStream {
+ public:
+ TCodedOutput(IOutputStream* out, const NBlockCodecs::ICodec* c, size_t bufLen = 16 << 20);
+ ~TCodedOutput() override;
+
+ private:
+ void DoWrite(const void* buf, size_t len) override;
+ void DoFlush() override;
+ void DoFinish() override;
+
+ void FlushImpl();
+
+ private:
+ const NBlockCodecs::ICodec* const C_;
+ TBuffer D_;
+ TBuffer O_;
+ IOutputStream* S_;
+ bool HdrWritten = false;
+ };
+}