aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/codecs/static
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/codecs/static
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/codecs/static')
-rw-r--r--library/cpp/codecs/static/builder.h2
-rw-r--r--library/cpp/codecs/static/example/example.cpp8
-rw-r--r--library/cpp/codecs/static/example/example.h10
-rw-r--r--library/cpp/codecs/static/static.cpp4
-rw-r--r--library/cpp/codecs/static/tools/static_codec_checker/static_codec_checker.cpp18
-rw-r--r--library/cpp/codecs/static/tools/static_codec_generator/static_codec_generator.cpp26
-rw-r--r--library/cpp/codecs/static/ut/builder_ut.cpp6
-rw-r--r--library/cpp/codecs/static/ut/static_ut.cpp6
8 files changed, 40 insertions, 40 deletions
diff --git a/library/cpp/codecs/static/builder.h b/library/cpp/codecs/static/builder.h
index d7533be4d5..ece4dfa529 100644
--- a/library/cpp/codecs/static/builder.h
+++ b/library/cpp/codecs/static/builder.h
@@ -19,7 +19,7 @@ namespace NCodecs {
time_t Timestamp = TInstant::Now().TimeT();
TString RevisionInfo = (TStringBuilder() << "r" << ToString(GetProgramSvnRevision()));
TString TrainingSetComment; // a human comment on the training data
- TString TrainingSetResId; // sandbox resid of the training set
+ TString TrainingSetResId; // sandbox resid of the training set
};
TStaticCodecInfo BuildStaticCodec(const TVector<TString>& trainingData, const TCodecBuildInfo&);
diff --git a/library/cpp/codecs/static/example/example.cpp b/library/cpp/codecs/static/example/example.cpp
index 5b750b717e..b0566a8c2e 100644
--- a/library/cpp/codecs/static/example/example.cpp
+++ b/library/cpp/codecs/static/example/example.cpp
@@ -5,10 +5,10 @@
#include <util/generic/yexception.h>
extern "C" {
-extern const ui8 codec_info_huff_20160707[];
-extern const ui32 codec_info_huff_20160707Size;
-extern const ui8 codec_info_sa_huff_20160707[];
-extern const ui32 codec_info_sa_huff_20160707Size;
+extern const ui8 codec_info_huff_20160707[];
+extern const ui32 codec_info_huff_20160707Size;
+extern const ui8 codec_info_sa_huff_20160707[];
+extern const ui32 codec_info_sa_huff_20160707Size;
};
namespace NStaticCodecExample {
diff --git a/library/cpp/codecs/static/example/example.h b/library/cpp/codecs/static/example/example.h
index f9b3a7324b..41003fb187 100644
--- a/library/cpp/codecs/static/example/example.h
+++ b/library/cpp/codecs/static/example/example.h
@@ -4,11 +4,11 @@
#include <util/generic/buffer.h>
namespace NStaticCodecExample {
- enum EDictVersion : ui8 {
- DV_NULL = 0,
- DV_HUFF_20160707,
- DV_SA_HUFF_20160707,
- DV_COUNT
+ enum EDictVersion : ui8 {
+ DV_NULL = 0,
+ DV_HUFF_20160707,
+ DV_SA_HUFF_20160707,
+ DV_COUNT
};
void Encode(TBuffer&, TStringBuf, EDictVersion dv = DV_SA_HUFF_20160707);
diff --git a/library/cpp/codecs/static/static.cpp b/library/cpp/codecs/static/static.cpp
index 44a07dd73a..97ddbd8364 100644
--- a/library/cpp/codecs/static/static.cpp
+++ b/library/cpp/codecs/static/static.cpp
@@ -69,8 +69,8 @@ namespace NCodecs {
s << "sample mult: " << ci.GetDebugInfo().GetSampleSizeMultiplier() << Endl;
s << "orig.compress: " << ci.GetDebugInfo().GetCompression() * 100 << " %" << Endl;
s << "timestamp: " << ci.GetDebugInfo().GetTimestamp() << " ("
- << NDatetime::TSimpleTM::NewLocal(ci.GetDebugInfo().GetTimestamp()).ToString()
- << ")" << Endl;
+ << NDatetime::TSimpleTM::NewLocal(ci.GetDebugInfo().GetTimestamp()).ToString()
+ << ")" << Endl;
s << "revision: " << ci.GetDebugInfo().GetRevisionInfo() << Endl;
s << "training set comment: " << ci.GetDebugInfo().GetTrainingSetComment() << Endl;
s << "training set resId: " << ci.GetDebugInfo().GetTrainingSetResId() << Endl;
diff --git a/library/cpp/codecs/static/tools/static_codec_checker/static_codec_checker.cpp b/library/cpp/codecs/static/tools/static_codec_checker/static_codec_checker.cpp
index 9c8d568d82..3668a7583a 100644
--- a/library/cpp/codecs/static/tools/static_codec_checker/static_codec_checker.cpp
+++ b/library/cpp/codecs/static/tools/static_codec_checker/static_codec_checker.cpp
@@ -22,17 +22,17 @@ int main(int argc, char** argv) {
opts.SetCmdLineDescr("-c 9089f3e9b7a0f0d4.codec_info -t -f base64 qtrees.sample.txt");
NCodecs::TStaticCodecInfo codec;
- opts.AddLongOption('c', "codec-info").RequiredArgument("codec_info").Handler1T<TString>([&codecFile, &codec, &codecPtr](TString name) {
- codecFile = name;
- codec.CopyFrom(NCodecs::LoadCodecInfoFromString(TUnbufferedFileInput(name).ReadAll()));
- codecPtr = NCodecs::ICodec::RestoreFromString(codec.GetStoredCodec());
- })
- .Required()
- .Help(".codec_info file with serialized static data for codec");
+ opts.AddLongOption('c', "codec-info").RequiredArgument("codec_info").Handler1T<TString>([&codecFile, &codec, &codecPtr](TString name) {
+ codecFile = name;
+ codec.CopyFrom(NCodecs::LoadCodecInfoFromString(TUnbufferedFileInput(name).ReadAll()));
+ codecPtr = NCodecs::ICodec::RestoreFromString(codec.GetStoredCodec());
+ })
+ .Required()
+ .Help(".codec_info file with serialized static data for codec");
- opts.AddLongOption('t', "test").NoArgument().StoreValue(&testCompression, true).Optional().Help("test current performance");
+ opts.AddLongOption('t', "test").NoArgument().StoreValue(&testCompression, true).Optional().Help("test current performance");
- opts.AddLongOption('f', "format").RequiredArgument(TStringBuilder() << "(" << NCodecs::DSF_PLAIN_LF << "|" << NCodecs::DSF_BASE64_LF << ")").StoreResult(&fmt).Optional().Help("test set input file format");
+ opts.AddLongOption('f', "format").RequiredArgument(TStringBuilder() << "(" << NCodecs::DSF_PLAIN_LF << "|" << NCodecs::DSF_BASE64_LF << ")").StoreResult(&fmt).Optional().Help("test set input file format");
opts.SetFreeArgsMin(0);
opts.SetFreeArgTitle(0, "testing_set_input_file", "testing set input files");
diff --git a/library/cpp/codecs/static/tools/static_codec_generator/static_codec_generator.cpp b/library/cpp/codecs/static/tools/static_codec_generator/static_codec_generator.cpp
index 45fdb5c5fe..073689737d 100644
--- a/library/cpp/codecs/static/tools/static_codec_generator/static_codec_generator.cpp
+++ b/library/cpp/codecs/static/tools/static_codec_generator/static_codec_generator.cpp
@@ -17,26 +17,26 @@ int main(int argc, char** argv) {
opts.SetCmdLineDescr("-m 'Training set: 100000 qtrees taken from web mmeta logs' -f base64 qtrees.sample.txt");
opts.SetTitle("Teaches the codec and serializes it as a file named CODECNAME.hash(CODECDATA).bin");
- opts.AddLongOption('m', "message").RequiredArgument("training_set_comment").StoreResult(&info.TrainingSetComment).Required().Help("a human description for the training set");
+ opts.AddLongOption('m', "message").RequiredArgument("training_set_comment").StoreResult(&info.TrainingSetComment).Required().Help("a human description for the training set");
- opts.AddLongOption('r', "resource").RequiredArgument("training_set_res_id").StoreResult(&info.TrainingSetResId).Optional().Help("sandbox resource id for the training set");
+ opts.AddLongOption('r', "resource").RequiredArgument("training_set_res_id").StoreResult(&info.TrainingSetResId).Optional().Help("sandbox resource id for the training set");
- opts.AddLongOption('c', "codec").RequiredArgument("codec_name").StoreResult(&info.CodecName).Optional().DefaultValue(info.CodecName);
+ opts.AddLongOption('c', "codec").RequiredArgument("codec_name").StoreResult(&info.CodecName).Optional().DefaultValue(info.CodecName);
- opts.AddLongOption('s', "sample-multiplier").RequiredArgument("multiplier").StoreResult(&info.SampleSizeMultiplier).Optional().DefaultValue(ToString(info.SampleSizeMultiplier)).Help("multiplier for default sample size");
+ opts.AddLongOption('s', "sample-multiplier").RequiredArgument("multiplier").StoreResult(&info.SampleSizeMultiplier).Optional().DefaultValue(ToString(info.SampleSizeMultiplier)).Help("multiplier for default sample size");
- opts.AddLongOption('f', "format").RequiredArgument(TStringBuilder() << "(" << NCodecs::DSF_PLAIN_LF << "|" << NCodecs::DSF_BASE64_LF << ")").StoreResult(&fmt).Required().Help("training set input file format");
+ opts.AddLongOption('f', "format").RequiredArgument(TStringBuilder() << "(" << NCodecs::DSF_PLAIN_LF << "|" << NCodecs::DSF_BASE64_LF << ")").StoreResult(&fmt).Required().Help("training set input file format");
- opts.AddLongOption("list-codecs").NoArgument().Handler0([]() {
- Cout << JoinStrings(NCodecs::ICodec::GetCodecsList(), "\n") << Endl;
- exit(0);
- })
- .Optional()
- .Help("list available codecs");
+ opts.AddLongOption("list-codecs").NoArgument().Handler0([]() {
+ Cout << JoinStrings(NCodecs::ICodec::GetCodecsList(), "\n") << Endl;
+ exit(0);
+ })
+ .Optional()
+ .Help("list available codecs");
- opts.AddLongOption("fake-revision").RequiredArgument("revision").StoreResult(&info.RevisionInfo).Optional().Hidden(); // replace static_codec_generator revision in debug info
+ opts.AddLongOption("fake-revision").RequiredArgument("revision").StoreResult(&info.RevisionInfo).Optional().Hidden(); // replace static_codec_generator revision in debug info
- opts.AddLongOption("fake-timestamp").RequiredArgument("timestamp").StoreResult(&info.Timestamp).Optional().Hidden(); // replace generating timestamp in debug info
+ opts.AddLongOption("fake-timestamp").RequiredArgument("timestamp").StoreResult(&info.Timestamp).Optional().Hidden(); // replace generating timestamp in debug info
opts.SetFreeArgsMin(0);
opts.SetFreeArgTitle(0, "training_set_input_file", "training set input files");
diff --git a/library/cpp/codecs/static/ut/builder_ut.cpp b/library/cpp/codecs/static/ut/builder_ut.cpp
index b47c279ed1..d9c4eb9e47 100644
--- a/library/cpp/codecs/static/ut/builder_ut.cpp
+++ b/library/cpp/codecs/static/ut/builder_ut.cpp
@@ -3,11 +3,11 @@
#include <library/cpp/codecs/static/static_codec_info.pb.h>
#include <util/string/vector.h>
-class TStaticCodecInfoBuilderTest: public NUnitTest::TTestBase {
+class TStaticCodecInfoBuilderTest: public NUnitTest::TTestBase {
UNIT_TEST_SUITE(TStaticCodecInfoBuilderTest)
- UNIT_TEST(TestBuild)
+ UNIT_TEST(TestBuild)
UNIT_TEST_SUITE_END();
-
+
private:
TVector<TString> PrepareData() {
TVector<TString> data;
diff --git a/library/cpp/codecs/static/ut/static_ut.cpp b/library/cpp/codecs/static/ut/static_ut.cpp
index 57e1e62887..315e1bf0b0 100644
--- a/library/cpp/codecs/static/ut/static_ut.cpp
+++ b/library/cpp/codecs/static/ut/static_ut.cpp
@@ -1,11 +1,11 @@
#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/codecs/static/example/example.h>
-class TStaticCodecUsageTest: public NUnitTest::TTestBase {
+class TStaticCodecUsageTest: public NUnitTest::TTestBase {
UNIT_TEST_SUITE(TStaticCodecUsageTest)
- UNIT_TEST(TestUsage)
+ UNIT_TEST(TestUsage)
UNIT_TEST_SUITE_END();
-
+
private:
void DoTestUsage(NStaticCodecExample::EDictVersion dv, size_t expectedSize) {
const TStringBuf letov = "Всё идёт по плану";