diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch) | |
tree | 26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/codecs/pfor_codec.h | |
parent | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff) | |
download | ydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/codecs/pfor_codec.h')
-rw-r--r-- | library/cpp/codecs/pfor_codec.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/codecs/pfor_codec.h b/library/cpp/codecs/pfor_codec.h index d7d4bb8bf4..4b51eafa51 100644 --- a/library/cpp/codecs/pfor_codec.h +++ b/library/cpp/codecs/pfor_codec.h @@ -37,19 +37,19 @@ namespace NCodecs { ui8 Encode(TStringBuf s, TBuffer& b) const override { b.Clear(); - if (s.empty()) { + if (s.empty()) { return 0; } - b.Reserve(2 * s.size() + b.Size()); + b.Reserve(2 * s.size() + b.Size()); if (WithDelta) { auto buffer = TBufferTlsCache::TlsInstance().Item(); TBuffer& db = buffer.Get(); db.Clear(); - db.Reserve(2 * s.size()); + db.Reserve(2 * s.size()); DeltaCodec.Encode(s, db); - s = TStringBuf{db.data(), db.size()}; + s = TStringBuf{db.data(), db.size()}; } TArrayRef<const TValue> tin{(const TValue*)s.data(), s.size() / sizeof(TValue)}; @@ -97,7 +97,7 @@ namespace NCodecs { if (!optimalbits || BitsInT == optimalbits) { b.Append((ui8)-1); - b.Append(s.data(), s.size()); + b.Append(s.data(), s.size()); return 0; } else { NBitIO::TBitOutputVector<TBuffer> bout(&b); @@ -124,11 +124,11 @@ namespace NCodecs { void Decode(TStringBuf s, TBuffer& b) const override { b.Clear(); - if (s.empty()) { + if (s.empty()) { return; } - b.Reserve(s.size() * sizeof(T) + b.Size()); + b.Reserve(s.size() * sizeof(T) + b.Size()); ui64 isplain = 0; ui64 hasexceptions = 0; @@ -145,7 +145,7 @@ namespace NCodecs { if (WithDelta) { DeltaCodec.Decode(s, b); } else { - b.Append(s.data(), s.size()); + b.Append(s.data(), s.size()); } } else { typename TDCodec::TDecoder decoder; @@ -161,11 +161,11 @@ namespace NCodecs { if (WithDelta) { if (decoder.Decode(t)) { TStringBuf r{(char*)&decoder.Result, sizeof(decoder.Result)}; - b.Append(r.data(), r.size()); + b.Append(r.data(), r.size()); } } else { TStringBuf r{(char*)&t, sizeof(t)}; - b.Append(r.data(), r.size()); + b.Append(r.data(), r.size()); } } } |