diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
commit | baa58daefa91fde4b4769facdbd2903763b9c6a8 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/codecs/huffman_codec.cpp | |
parent | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff) | |
download | ydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/codecs/huffman_codec.cpp')
-rw-r--r-- | library/cpp/codecs/huffman_codec.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/codecs/huffman_codec.cpp b/library/cpp/codecs/huffman_codec.cpp index a78c10d0b4..650fe7cdfd 100644 --- a/library/cpp/codecs/huffman_codec.cpp +++ b/library/cpp/codecs/huffman_codec.cpp @@ -69,7 +69,7 @@ namespace NCodecs { TStringBuf r; while (in->NextRegion(r)) { - for (ui64 i = 0; i < r.size(); ++i) + for (ui64 i = 0; i < r.size(); ++i) ++freqs[(ui8)r[i]]; } @@ -249,11 +249,11 @@ namespace NCodecs { ui8 Encode(TStringBuf in, TBuffer& out) const { out.Clear(); - if (in.empty()) { + if (in.empty()) { return 0; } - out.Reserve(in.size() * 2); + out.Reserve(in.size() * 2); { NBitIO::TBitOutputVector<TBuffer> bout(&out); @@ -282,7 +282,7 @@ namespace NCodecs { void Decode(TStringBuf in, TBuffer& out) const { out.Clear(); - if (in.empty()) { + if (in.empty()) { return; } @@ -293,9 +293,9 @@ namespace NCodecs { // if data is uncompressed if (!f) { in.Skip(1); - out.Append(in.data(), in.size()); + out.Append(in.data(), in.size()); } else { - out.Reserve(in.size() * 8); + out.Reserve(in.size() * 8); if (Cache.Get()) { Cache->Decode(bin, out); |