diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 9123176b341b6f2658cff5132482b8237c1416c8 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/codecs/huffman_codec.h | |
parent | 59e19371de37995fcb36beb16cd6ec030af960bc (diff) | |
download | ydb-9123176b341b6f2658cff5132482b8237c1416c8.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/codecs/huffman_codec.h')
-rw-r--r-- | library/cpp/codecs/huffman_codec.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/codecs/huffman_codec.h b/library/cpp/codecs/huffman_codec.h index 1c00a806375..559545b90d9 100644 --- a/library/cpp/codecs/huffman_codec.h +++ b/library/cpp/codecs/huffman_codec.h @@ -1,33 +1,33 @@ -#pragma once - -#include "codecs.h" - -#include <util/generic/ptr.h> +#pragma once + +#include "codecs.h" + +#include <util/generic/ptr.h> #include <util/string/cast.h> - -namespace NCodecs { + +namespace NCodecs { // for types greater than char, pipeline with TFreqCodec. - + class THuffmanCodec: public ICodec { class TImpl; TIntrusivePtr<TImpl> Impl; - + public: THuffmanCodec(); ~THuffmanCodec() override; - + static TStringBuf MyName() { return "huffman"; } - + TString GetName() const override { return ToString(MyName()); } - + ui8 Encode(TStringBuf in, TBuffer& bbb) const override; - + void Decode(TStringBuf in, TBuffer& bbb) const override; - + void LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs); protected: @@ -35,5 +35,5 @@ namespace NCodecs { void Save(IOutputStream* out) const override; void Load(IInputStream* in) override; }; - -} + +} |