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/pfor_codec.h | |
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/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 4b51eafa51..d7d4bb8bf4 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()); } } } |