aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/streams/zstd/zstd.h
diff options
context:
space:
mode:
authorbulatman <bulatman@yandex-team.ru>2022-02-10 16:45:50 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:50 +0300
commit6560e4993b14d193f8c879e33a3de5e5eba6e21d (patch)
treecfd2e2baa05c3196f2caacbb63c32e1df40bc3de /library/cpp/streams/zstd/zstd.h
parent7489e4682331202b9c7d863c0898eb83d7b12c2b (diff)
downloadydb-6560e4993b14d193f8c879e33a3de5e5eba6e21d.tar.gz
Restoring authorship annotation for <bulatman@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/streams/zstd/zstd.h')
-rw-r--r--library/cpp/streams/zstd/zstd.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/library/cpp/streams/zstd/zstd.h b/library/cpp/streams/zstd/zstd.h
index 667a0494b7..4f1583d067 100644
--- a/library/cpp/streams/zstd/zstd.h
+++ b/library/cpp/streams/zstd/zstd.h
@@ -1,53 +1,53 @@
-#pragma once
-
-#include <util/generic/ptr.h>
-#include <util/stream/input.h>
-#include <util/stream/output.h>
-
-/**
- * @addtogroup Streams_Archs
- * @{
- */
-
-// @brief Stream to compress into zstd archive
-class TZstdCompress: public IOutputStream {
-public:
- /**
- @param slave stream to write compressed data to
- @param quality, higher quality - slower but better compression.
+#pragma once
+
+#include <util/generic/ptr.h>
+#include <util/stream/input.h>
+#include <util/stream/output.h>
+
+/**
+ * @addtogroup Streams_Archs
+ * @{
+ */
+
+// @brief Stream to compress into zstd archive
+class TZstdCompress: public IOutputStream {
+public:
+ /**
+ @param slave stream to write compressed data to
+ @param quality, higher quality - slower but better compression.
0 is default compression (see constant ZSTD_CLEVEL_DEFAULT(3))
- max compression is ZSTD_MAX_CLEVEL (22)
- */
+ max compression is ZSTD_MAX_CLEVEL (22)
+ */
explicit TZstdCompress(IOutputStream* slave, int quality = 0);
- ~TZstdCompress() override;
-private:
- void DoWrite(const void* buffer, size_t size) override;
- void DoFlush() override;
- void DoFinish() override;
-
-public:
- class TImpl;
- THolder<TImpl> Impl_;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
-// @brief Buffered stream to decompress from zstd archive
-class TZstdDecompress: public IInputStream {
-public:
- /**
- @param slave stream to read compressed data from
- @param bufferSize approximate size of buffer compressed data is read in
- */
- explicit TZstdDecompress(IInputStream* slave, size_t bufferSize = 8 * 1024);
- ~TZstdDecompress() override;
-
-private:
- size_t DoRead(void* buffer, size_t size) override;
-
-private:
- class TImpl;
- THolder<TImpl> Impl_;
-};
-
-/** @} */
+ ~TZstdCompress() override;
+private:
+ void DoWrite(const void* buffer, size_t size) override;
+ void DoFlush() override;
+ void DoFinish() override;
+
+public:
+ class TImpl;
+ THolder<TImpl> Impl_;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+// @brief Buffered stream to decompress from zstd archive
+class TZstdDecompress: public IInputStream {
+public:
+ /**
+ @param slave stream to read compressed data from
+ @param bufferSize approximate size of buffer compressed data is read in
+ */
+ explicit TZstdDecompress(IInputStream* slave, size_t bufferSize = 8 * 1024);
+ ~TZstdDecompress() override;
+
+private:
+ size_t DoRead(void* buffer, size_t size) override;
+
+private:
+ class TImpl;
+ THolder<TImpl> Impl_;
+};
+
+/** @} */