aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/codecs
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-02-10 16:45:12 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:12 +0300
commit49116032d905455a7b1c994e4a696afc885c1e71 (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /library/cpp/codecs
parent4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff)
downloadydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/codecs')
-rw-r--r--library/cpp/codecs/codecs.h4
-rw-r--r--library/cpp/codecs/codecs_registry.cpp30
-rw-r--r--library/cpp/codecs/codecs_registry.h2
-rw-r--r--library/cpp/codecs/comptable_codec.cpp2
-rw-r--r--library/cpp/codecs/delta_codec.h14
-rw-r--r--library/cpp/codecs/float_huffman.cpp2
-rw-r--r--library/cpp/codecs/huffman_codec.cpp4
-rw-r--r--library/cpp/codecs/huffman_codec.h4
-rw-r--r--library/cpp/codecs/pfor_codec.h10
-rw-r--r--library/cpp/codecs/solar_codec.h8
-rw-r--r--library/cpp/codecs/static/static.cpp2
-rw-r--r--library/cpp/codecs/ut/codecs_ut.cpp2
-rw-r--r--library/cpp/codecs/zstd_dict_codec.cpp8
13 files changed, 46 insertions, 46 deletions
diff --git a/library/cpp/codecs/codecs.h b/library/cpp/codecs/codecs.h
index 52e9b2624b..cc5e72b285 100644
--- a/library/cpp/codecs/codecs.h
+++ b/library/cpp/codecs/codecs.h
@@ -168,7 +168,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ return ToString(MyName());
}
};
@@ -184,7 +184,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ return ToString(MyName());
}
};
diff --git a/library/cpp/codecs/codecs_registry.cpp b/library/cpp/codecs/codecs_registry.cpp
index 50abf61ad6..17d07062ab 100644
--- a/library/cpp/codecs/codecs_registry.cpp
+++ b/library/cpp/codecs/codecs_registry.cpp
@@ -101,18 +101,18 @@ namespace NCodecs {
TVector<TString> ListNames() const override {
TVector<TString> vs;
- vs.push_back(ToString(TSolarCodec::MyName()));
- vs.push_back(ToString(TSolarCodec::MyName8k()));
- vs.push_back(ToString(TSolarCodec::MyName16k()));
- vs.push_back(ToString(TSolarCodec::MyName32k()));
- vs.push_back(ToString(TSolarCodec::MyName64k()));
- vs.push_back(ToString(TSolarCodec::MyName256k()));
- vs.push_back(ToString(TSolarCodec::MyName8kAdapt()));
- vs.push_back(ToString(TSolarCodec::MyName16kAdapt()));
- vs.push_back(ToString(TSolarCodec::MyName32kAdapt()));
- vs.push_back(ToString(TSolarCodec::MyName64kAdapt()));
- vs.push_back(ToString(TSolarCodec::MyName256kAdapt()));
- vs.push_back(ToString(TSolarCodec::MyNameShortInt()));
+ vs.push_back(ToString(TSolarCodec::MyName()));
+ vs.push_back(ToString(TSolarCodec::MyName8k()));
+ vs.push_back(ToString(TSolarCodec::MyName16k()));
+ vs.push_back(ToString(TSolarCodec::MyName32k()));
+ vs.push_back(ToString(TSolarCodec::MyName64k()));
+ vs.push_back(ToString(TSolarCodec::MyName256k()));
+ vs.push_back(ToString(TSolarCodec::MyName8kAdapt()));
+ vs.push_back(ToString(TSolarCodec::MyName16kAdapt()));
+ vs.push_back(ToString(TSolarCodec::MyName32kAdapt()));
+ vs.push_back(ToString(TSolarCodec::MyName64kAdapt()));
+ vs.push_back(ToString(TSolarCodec::MyName256kAdapt()));
+ vs.push_back(ToString(TSolarCodec::MyNameShortInt()));
return vs;
}
};
@@ -141,8 +141,8 @@ namespace NCodecs {
TVector<TString> ListNames() const override {
TVector<TString> vs;
- vs.push_back(ToString(TCompTableCodec::MyNameHQ()));
- vs.push_back(ToString(TCompTableCodec::MyNameLQ()));
+ vs.push_back(ToString(TCompTableCodec::MyNameHQ()));
+ vs.push_back(ToString(TCompTableCodec::MyNameLQ()));
return vs;
}
};
@@ -156,7 +156,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(Codec->Name());
+ return ToString(Codec->Name());
}
ui8 Encode(TStringBuf r, TBuffer& b) const override {
diff --git a/library/cpp/codecs/codecs_registry.h b/library/cpp/codecs/codecs_registry.h
index cc89015936..53710310d5 100644
--- a/library/cpp/codecs/codecs_registry.h
+++ b/library/cpp/codecs/codecs_registry.h
@@ -27,7 +27,7 @@ namespace NCodecs {
TVector<TString> ListNames() const override {
TVector<TString> vs;
- vs.push_back(ToString(TCodec::MyName()));
+ vs.push_back(ToString(TCodec::MyName()));
return vs;
}
};
diff --git a/library/cpp/codecs/comptable_codec.cpp b/library/cpp/codecs/comptable_codec.cpp
index 28c9554b36..476b8ada80 100644
--- a/library/cpp/codecs/comptable_codec.cpp
+++ b/library/cpp/codecs/comptable_codec.cpp
@@ -82,7 +82,7 @@ namespace NCodecs {
TCompTableCodec::~TCompTableCodec() = default;
TString TCompTableCodec::GetName() const {
- return ToString(Impl->Quality ? MyNameHQ() : MyNameLQ());
+ return ToString(Impl->Quality ? MyNameHQ() : MyNameLQ());
}
ui8 TCompTableCodec::Encode(TStringBuf in, TBuffer& out) const {
diff --git a/library/cpp/codecs/delta_codec.h b/library/cpp/codecs/delta_codec.h
index e3ac4e769e..21325825e6 100644
--- a/library/cpp/codecs/delta_codec.h
+++ b/library/cpp/codecs/delta_codec.h
@@ -2,7 +2,7 @@
#include "codecs.h"
-#include <util/generic/array_ref.h>
+#include <util/generic/array_ref.h>
#include <util/generic/typetraits.h>
#include <util/generic/bitops.h>
#include <util/string/cast.h>
@@ -70,7 +70,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ return ToString(MyName());
}
template <class TItem>
@@ -85,16 +85,16 @@ namespace NCodecs {
}
b.Reserve(s.size());
- TArrayRef<const T> tin{(const T*)s.data(), s.size() / sizeof(T)};
+ TArrayRef<const T> tin{(const T*)s.data(), s.size() / sizeof(T)};
- const T* it = tin.begin();
+ const T* it = tin.begin();
TDelta last = *(it++);
AppendTo(b, last);
TDelta maxt = SubSafe(MaxDelta, last);
TDelta mint = AddSafe(MinDelta, last);
- for (; it != tin.end(); ++it) {
+ for (; it != tin.end(); ++it) {
TDelta t = *it;
if (Y_LIKELY((t >= mint) & (t <= maxt))) {
@@ -122,11 +122,11 @@ namespace NCodecs {
}
b.Reserve(s.size());
- TArrayRef<const T> tin{(const T*)s.data(), s.size() / sizeof(T)};
+ TArrayRef<const T> tin{(const T*)s.data(), s.size() / sizeof(T)};
TDecoder dec;
- for (const T* it = tin.begin(); it != tin.end(); ++it) {
+ for (const T* it = tin.begin(); it != tin.end(); ++it) {
T tmp;
memcpy(&tmp, it, sizeof(tmp));
if (dec.Decode(tmp)) {
diff --git a/library/cpp/codecs/float_huffman.cpp b/library/cpp/codecs/float_huffman.cpp
index 3a0d995b21..c4a8bd228f 100644
--- a/library/cpp/codecs/float_huffman.cpp
+++ b/library/cpp/codecs/float_huffman.cpp
@@ -57,7 +57,7 @@ namespace NCodecs::NFloatHuff {
{0x00000000, 0x16, 5, 32}, // whole range, 37 bits, prefix [01101]
};
- [[noreturn]] Y_NO_INLINE void ThrowInvalidOffset(size_t size, size_t byteOffset) {
+ [[noreturn]] Y_NO_INLINE void ThrowInvalidOffset(size_t size, size_t byteOffset) {
ythrow yexception() <<
"Decompression error: requested decoding 8 bytes past end of input buffer of " << size << " bytes size at position " << byteOffset << ". ";
}
diff --git a/library/cpp/codecs/huffman_codec.cpp b/library/cpp/codecs/huffman_codec.cpp
index 96feeeca36..650fe7cdfd 100644
--- a/library/cpp/codecs/huffman_codec.cpp
+++ b/library/cpp/codecs/huffman_codec.cpp
@@ -461,7 +461,7 @@ namespace NCodecs {
BuildDecoder();
}
- void LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs) {
+ void LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs) {
TCodeTree tree;
ui64 freqsArray[256];
@@ -584,7 +584,7 @@ namespace NCodecs {
Impl->Learn(&in);
}
- void THuffmanCodec::LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs) {
+ void THuffmanCodec::LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs) {
Impl->LearnByFreqs(freqs);
Trained = true;
}
diff --git a/library/cpp/codecs/huffman_codec.h b/library/cpp/codecs/huffman_codec.h
index 9880dff470..559545b90d 100644
--- a/library/cpp/codecs/huffman_codec.h
+++ b/library/cpp/codecs/huffman_codec.h
@@ -21,14 +21,14 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ 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);
+ void LearnByFreqs(const TArrayRef<std::pair<char, ui64>>& freqs);
protected:
void DoLearn(ISequenceReader& in) override;
diff --git a/library/cpp/codecs/pfor_codec.h b/library/cpp/codecs/pfor_codec.h
index 31d71aafb5..d7d4bb8bf4 100644
--- a/library/cpp/codecs/pfor_codec.h
+++ b/library/cpp/codecs/pfor_codec.h
@@ -32,7 +32,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ return ToString(MyName());
}
ui8 Encode(TStringBuf s, TBuffer& b) const override {
@@ -52,15 +52,15 @@ namespace NCodecs {
s = TStringBuf{db.data(), db.size()};
}
- TArrayRef<const TValue> tin{(const TValue*)s.data(), s.size() / sizeof(TValue)};
+ TArrayRef<const TValue> tin{(const TValue*)s.data(), s.size() / sizeof(TValue)};
- const ui64 sz = tin.size();
+ const ui64 sz = tin.size();
ui64 bitcounts[BitsInT + 1];
Zero(bitcounts);
ui32 zeros = 0;
- for (const TValue* it = tin.begin(); it != tin.end(); ++it) {
+ for (const TValue* it = tin.begin(); it != tin.end(); ++it) {
TUnsigned v = 1 + (TUnsigned)*it;
ui64 l = MostSignificantBit(v) + 1;
++bitcounts[l];
@@ -105,7 +105,7 @@ namespace NCodecs {
bout.Write(hasexceptions, 1);
bout.Write(optimalbits, 6);
- for (const TValue* it = tin.begin(); it != tin.end(); ++it) {
+ for (const TValue* it = tin.begin(); it != tin.end(); ++it) {
TUnsigned word = 1 + (TUnsigned)*it;
ui64 len = MostSignificantBit(word) + 1;
if (len > optimalbits || !word) {
diff --git a/library/cpp/codecs/solar_codec.h b/library/cpp/codecs/solar_codec.h
index 79c1d94c6a..7158ae7926 100644
--- a/library/cpp/codecs/solar_codec.h
+++ b/library/cpp/codecs/solar_codec.h
@@ -121,7 +121,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyName());
+ return ToString(MyName());
}
protected:
@@ -207,9 +207,9 @@ namespace NCodecs {
TString GetName() const override {
if (CanUseShortInt()) {
- return ToString(MyNameShortInt());
+ return ToString(MyNameShortInt());
} else {
- return ToString(MyName());
+ return ToString(MyName());
}
}
};
@@ -231,7 +231,7 @@ namespace NCodecs {
}
TString GetName() const override {
- return ToString(MyNameShortInt());
+ return ToString(MyNameShortInt());
}
protected:
diff --git a/library/cpp/codecs/static/static.cpp b/library/cpp/codecs/static/static.cpp
index cf4d74a43f..44a07dd73a 100644
--- a/library/cpp/codecs/static/static.cpp
+++ b/library/cpp/codecs/static/static.cpp
@@ -21,7 +21,7 @@ namespace NCodecs {
void SaveCodecInfoToStream(IOutputStream& out, const TStaticCodecInfo& info) {
TBufferOutput bout;
- info.SerializeToArcadiaStream(&bout);
+ info.SerializeToArcadiaStream(&bout);
ui64 hash = DataSignature(bout.Buffer());
out.Write(GetStaticCodecInfoMagic());
::Save(&out, hash);
diff --git a/library/cpp/codecs/ut/codecs_ut.cpp b/library/cpp/codecs/ut/codecs_ut.cpp
index 8696cc760b..caf6089aef 100644
--- a/library/cpp/codecs/ut/codecs_ut.cpp
+++ b/library/cpp/codecs/ut/codecs_ut.cpp
@@ -1233,7 +1233,7 @@ private:
}
}
- codec.LearnByFreqs(TArrayRef<std::pair<char, ui64>>(freqs, Y_ARRAY_SIZE(freqs)));
+ codec.LearnByFreqs(TArrayRef<std::pair<char, ui64>>(freqs, Y_ARRAY_SIZE(freqs)));
for (ui32 i = 0; i < data.size(); ++i) {
outLearnByFreqs.emplace_back();
diff --git a/library/cpp/codecs/zstd_dict_codec.cpp b/library/cpp/codecs/zstd_dict_codec.cpp
index 28de94ffc6..c42a2879e6 100644
--- a/library/cpp/codecs/zstd_dict_codec.cpp
+++ b/library/cpp/codecs/zstd_dict_codec.cpp
@@ -11,9 +11,9 @@
#define ZDICT_STATIC_LINKING_ONLY
-#include <contrib/libs/zstd/include/zdict.h>
-#include <contrib/libs/zstd/include/zstd.h>
-#include <contrib/libs/zstd/include/zstd_errors.h>
+#include <contrib/libs/zstd/include/zdict.h>
+#include <contrib/libs/zstd/include/zstd.h>
+#include <contrib/libs/zstd/include/zstd_errors.h>
// See IGNIETFERRO-320 for possible bugs
@@ -234,7 +234,7 @@ namespace NCodecs {
}
TString TZStdDictCodec::GetName() const {
- return TStringBuilder() << MyName() << "-" << Impl->GetCompressionLevel();
+ return TStringBuilder() << MyName() << "-" << Impl->GetCompressionLevel();
}
ui8 TZStdDictCodec::Encode(TStringBuf in, TBuffer& out) const {