diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/codecs/static/tools | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/codecs/static/tools')
4 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/codecs/static/tools/common/ct_common.cpp b/library/cpp/codecs/static/tools/common/ct_common.cpp index fe77691280..ab4a2fac3f 100644 --- a/library/cpp/codecs/static/tools/common/ct_common.cpp +++ b/library/cpp/codecs/static/tools/common/ct_common.cpp @@ -9,7 +9,7 @@ #include <util/system/hp_timer.h> namespace NCodecs { - TString TComprStats::Format(const TStaticCodecInfo& info, bool checkMode) const { + TString TComprStats::Format(const TStaticCodecInfo& info, bool checkMode) const { TStringBuilder s; s << "raw size/item: " << RawSizePerRecord() << Endl; s << "enc.size/item: " << EncSizePerRecord() << Endl; @@ -26,7 +26,7 @@ namespace NCodecs { return s; } - TComprStats TestCodec(const ICodec& c, const TVector<TString>& input) { + TComprStats TestCodec(const ICodec& c, const TVector<TString>& input) { TComprStats stats; TBuffer encodeBuffer; @@ -51,10 +51,10 @@ namespace NCodecs { return stats; } - void ParseBlob(TVector<TString>& result, EDataStreamFormat fmt, const TBlob& blob) { + void ParseBlob(TVector<TString>& result, EDataStreamFormat fmt, const TBlob& blob) { TStringBuf bin(blob.AsCharPtr(), blob.Size()); TStringBuf line; - TString buffer; + TString buffer; while (bin.ReadLine(line)) { if (DSF_BASE64_LF == fmt) { Base64Decode(line, buffer); @@ -67,7 +67,7 @@ namespace NCodecs { } } - TBlob GetInputBlob(const TString& dataFile) { + TBlob GetInputBlob(const TString& dataFile) { return dataFile && dataFile != "-" ? TBlob::FromFile(dataFile) : TBlob::FromStream(Cin); } diff --git a/library/cpp/codecs/static/tools/common/ct_common.h b/library/cpp/codecs/static/tools/common/ct_common.h index 9d3dcbda93..a66c476c3d 100644 --- a/library/cpp/codecs/static/tools/common/ct_common.h +++ b/library/cpp/codecs/static/tools/common/ct_common.h @@ -1,6 +1,6 @@ #pragma once -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/memory/blob.h> #include <cmath> @@ -57,10 +57,10 @@ namespace NCodecs { return PerRecord((1 - compr) * RawSize); } - TString Format(const TStaticCodecInfo&, bool checkMode) const; + TString Format(const TStaticCodecInfo&, bool checkMode) const; }; - TComprStats TestCodec(const ICodec&, const TVector<TString>& data); + TComprStats TestCodec(const ICodec&, const TVector<TString>& data); enum EDataStreamFormat { DSF_NONE, @@ -68,8 +68,8 @@ namespace NCodecs { DSF_BASE64_LF /* "base64" */, }; - void ParseBlob(TVector<TString>&, EDataStreamFormat, const TBlob&); + void ParseBlob(TVector<TString>&, EDataStreamFormat, const TBlob&); - TBlob GetInputBlob(const TString& dataFile); + TBlob GetInputBlob(const TString& dataFile); } 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..1775a07303 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 @@ -14,7 +14,7 @@ int main(int argc, char** argv) { NCodecs::TCodecPtr codecPtr; NCodecs::EDataStreamFormat fmt = NCodecs::DSF_NONE; - TString codecFile; + TString codecFile; bool testCompression = false; auto opts = NLastGetopt::TOpts::Default(); @@ -50,7 +50,7 @@ int main(int argc, char** argv) { Cout << "Reading testing set data ... " << Flush; - TVector<TString> allData; + TVector<TString> allData; for (const auto& freeArg : res.GetFreeArgs()) { NCodecs::ParseBlob(allData, fmt, NCodecs::GetInputBlob(freeArg)); } 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..c5b4f0fcde 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 @@ -44,7 +44,7 @@ int main(int argc, char** argv) { NLastGetopt::TOptsParseResult res(&opts, argc, argv); Cout << "Reading training set data ... " << Flush; - TVector<TString> allData; + TVector<TString> allData; for (const auto& freeArg : res.GetFreeArgs()) { NCodecs::ParseBlob(allData, fmt, NCodecs::GetInputBlob(freeArg)); } @@ -61,7 +61,7 @@ int main(int argc, char** argv) { auto codec = NCodecs::BuildStaticCodec(allData, info); Cout << "Done" << Endl; - TString codecName = NCodecs::GetStandardFileName(codec); + TString codecName = NCodecs::GetStandardFileName(codec); NCodecs::TCodecPtr codecPtr = NCodecs::ICodec::RestoreFromString(codec.GetStoredCodec()); Cout << "Testing compression ... " << Flush; @@ -74,7 +74,7 @@ int main(int argc, char** argv) { Cout << "Saving as " << codecName << " ... " << Flush; { - TUnbufferedFileOutput fout{codecName}; + TUnbufferedFileOutput fout{codecName}; NCodecs::SaveCodecInfoToStream(fout, codec); fout.Finish(); } |