diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:44 +0300 |
commit | 59e19371de37995fcb36beb16cd6ec030af960bc (patch) | |
tree | fa68e36093ebff8b805462e9e6d331fe9d348214 /library/cpp/codecs/huffman_codec.h | |
parent | 89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff) | |
download | ydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 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 559545b90d..1c00a80637 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; }; - -} + +} |