diff options
| author | Vlad Yaroslavlev <[email protected]> | 2022-02-10 16:46:25 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:25 +0300 | 
| commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
| tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/blockcodecs | |
| parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/blockcodecs')
| -rw-r--r-- | library/cpp/blockcodecs/codecs/brotli/brotli.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/bzip/bzip.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp | 8 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/lz4/lz4.cpp | 8 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/lzma/lzma.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/snappy/snappy.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/zlib/zlib.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs/zstd/zstd.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/codecs_ut.cpp | 12 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/core/codecs.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/core/codecs.h | 20 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/core/common.h | 4 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/core/stream.cpp | 4 | ||||
| -rw-r--r-- | library/cpp/blockcodecs/core/stream.h | 4 | 
15 files changed, 42 insertions, 42 deletions
| diff --git a/library/cpp/blockcodecs/codecs/brotli/brotli.cpp b/library/cpp/blockcodecs/codecs/brotli/brotli.cpp index a23765b0d48..6e3cd971bdc 100644 --- a/library/cpp/blockcodecs/codecs/brotli/brotli.cpp +++ b/library/cpp/blockcodecs/codecs/brotli/brotli.cpp @@ -59,7 +59,7 @@ namespace {      struct TBrotliRegistrar {          TBrotliRegistrar() {              for (int i = 1; i <= TBrotliCodec::BEST_QUALITY; ++i) { -                RegisterCodec(MakeHolder<TBrotliCodec>(i));  +                RegisterCodec(MakeHolder<TBrotliCodec>(i));              }          }      }; diff --git a/library/cpp/blockcodecs/codecs/bzip/bzip.cpp b/library/cpp/blockcodecs/codecs/bzip/bzip.cpp index 230165e817a..3a5cfdd0e9a 100644 --- a/library/cpp/blockcodecs/codecs/bzip/bzip.cpp +++ b/library/cpp/blockcodecs/codecs/bzip/bzip.cpp @@ -53,7 +53,7 @@ namespace {      struct TBZipRegistrar {          TBZipRegistrar() {              for (int i = 1; i < 10; ++i) { -                RegisterCodec(MakeHolder<TBZipCodec>(i));  +                RegisterCodec(MakeHolder<TBZipCodec>(i));              }              RegisterAlias("bzip2", "bzip2-6");          } diff --git a/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp b/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp index 49c8bb59022..da2831fbd24 100644 --- a/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp +++ b/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp @@ -45,7 +45,7 @@ namespace {      struct TFastLZRegistrar {          TFastLZRegistrar() {              for (int i = 0; i < 3; ++i) { -                RegisterCodec(MakeHolder<TFastLZCodec>(i));  +                RegisterCodec(MakeHolder<TFastLZCodec>(i));              }              RegisterAlias("fastlz", "fastlz-0");          } diff --git a/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp b/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp index 0416ff964fc..042f031679c 100644 --- a/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp +++ b/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp @@ -23,7 +23,7 @@ namespace {              return ret;          } -        static inline size_t DoMaxCompressedLength(size_t l) noexcept {  +        static inline size_t DoMaxCompressedLength(size_t l) noexcept {              return ZSTD_compressBound(l);          } @@ -39,18 +39,18 @@ namespace {              }          } -        TStringBuf Name() const noexcept override {  +        TStringBuf Name() const noexcept override {              return MyName;          }          const unsigned Level; -        const TString MyName;  +        const TString MyName;      };      struct TZStd06Registrar {          TZStd06Registrar() {              for (unsigned i = 1; i <= ZSTD_maxCLevel(); ++i) { -                RegisterCodec(MakeHolder<TZStd06Codec>(i));  +                RegisterCodec(MakeHolder<TZStd06Codec>(i));              }          }      }; diff --git a/library/cpp/blockcodecs/codecs/lz4/lz4.cpp b/library/cpp/blockcodecs/codecs/lz4/lz4.cpp index f800b503163..fbf0fe110f1 100644 --- a/library/cpp/blockcodecs/codecs/lz4/lz4.cpp +++ b/library/cpp/blockcodecs/codecs/lz4/lz4.cpp @@ -101,16 +101,16 @@ namespace {                  THolder<T2> t2(new T2(i));                  if (t1->Methods) { -                    RegisterCodec(std::move(t1));  +                    RegisterCodec(std::move(t1));                  }                  if (t2->Methods) { -                    RegisterCodec(std::move(t2));  +                    RegisterCodec(std::move(t2));                  }              } -            RegisterCodec(MakeHolder<TLz4Codec<TLz4BestCompress, TLz4FastDecompress>>());  -            RegisterCodec(MakeHolder<TLz4Codec<TLz4BestCompress, TLz4SafeDecompress>>());  +            RegisterCodec(MakeHolder<TLz4Codec<TLz4BestCompress, TLz4FastDecompress>>()); +            RegisterCodec(MakeHolder<TLz4Codec<TLz4BestCompress, TLz4SafeDecompress>>());              RegisterAlias("lz4-fast-safe", "lz4-fast14-safe");              RegisterAlias("lz4-fast-fast", "lz4-fast14-fast"); diff --git a/library/cpp/blockcodecs/codecs/lzma/lzma.cpp b/library/cpp/blockcodecs/codecs/lzma/lzma.cpp index ab3a2466f58..6c8d5fded42 100644 --- a/library/cpp/blockcodecs/codecs/lzma/lzma.cpp +++ b/library/cpp/blockcodecs/codecs/lzma/lzma.cpp @@ -65,7 +65,7 @@ namespace {      struct TLzmaRegistrar {          TLzmaRegistrar() {              for (int i = 0; i < 10; ++i) { -                RegisterCodec(MakeHolder<TLzmaCodec>(i));  +                RegisterCodec(MakeHolder<TLzmaCodec>(i));              }              RegisterAlias("lzma", "lzma-5");          } diff --git a/library/cpp/blockcodecs/codecs/snappy/snappy.cpp b/library/cpp/blockcodecs/codecs/snappy/snappy.cpp index 44d8c140a42..f6be05a05fc 100644 --- a/library/cpp/blockcodecs/codecs/snappy/snappy.cpp +++ b/library/cpp/blockcodecs/codecs/snappy/snappy.cpp @@ -45,7 +45,7 @@ namespace {      struct TSnappyRegistrar {          TSnappyRegistrar() { -            RegisterCodec(MakeHolder<TSnappyCodec>());  +            RegisterCodec(MakeHolder<TSnappyCodec>());          }      };      const TSnappyRegistrar Registrar{}; diff --git a/library/cpp/blockcodecs/codecs/zlib/zlib.cpp b/library/cpp/blockcodecs/codecs/zlib/zlib.cpp index fc1f602d9fd..cdb556c36d4 100644 --- a/library/cpp/blockcodecs/codecs/zlib/zlib.cpp +++ b/library/cpp/blockcodecs/codecs/zlib/zlib.cpp @@ -55,7 +55,7 @@ namespace {      struct TZLibRegistrar {          TZLibRegistrar() {              for (int i = 0; i < 10; ++i) { -                RegisterCodec(MakeHolder<TZLibCodec>(i));  +                RegisterCodec(MakeHolder<TZLibCodec>(i));              }              RegisterAlias("zlib", "zlib-6");          } diff --git a/library/cpp/blockcodecs/codecs/zstd/zstd.cpp b/library/cpp/blockcodecs/codecs/zstd/zstd.cpp index 3f905c8687a..95299b3f6d3 100644 --- a/library/cpp/blockcodecs/codecs/zstd/zstd.cpp +++ b/library/cpp/blockcodecs/codecs/zstd/zstd.cpp @@ -50,7 +50,7 @@ namespace {      struct TZStd08Registrar {          TZStd08Registrar() {              for (int i = 1; i <= ZSTD_maxCLevel(); ++i) { -                RegisterCodec(MakeHolder<TZStd08Codec>(i));  +                RegisterCodec(MakeHolder<TZStd08Codec>(i));                  RegisterAlias("zstd_" + ToString(i), "zstd08_" + ToString(i));              }          } diff --git a/library/cpp/blockcodecs/codecs_ut.cpp b/library/cpp/blockcodecs/codecs_ut.cpp index d5e167b85e2..bfe5a236909 100644 --- a/library/cpp/blockcodecs/codecs_ut.cpp +++ b/library/cpp/blockcodecs/codecs_ut.cpp @@ -17,7 +17,7 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) {      }      void TestAllAtOnce(size_t n, size_t m) { -        TVector<TBuffer> datas;  +        TVector<TBuffer> datas;          datas.emplace_back();          datas.push_back(Buffer("na gorshke sidel korol")); @@ -50,7 +50,7 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) {              for (size_t j = 0; j < datas.size(); ++j) {                  const TBuffer& data = datas[j]; -                TString res;  +                TString res;                  try {                      TBuffer e, d; @@ -144,11 +144,11 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) {      }      void TestStreams(size_t n, size_t m) { -        TVector<TString> datas;  -        TString res;  +        TVector<TString> datas; +        TString res;          for (size_t i = 0; i < 256; ++i) { -            datas.push_back(TString(i, (char)(i % 128)));  +            datas.push_back(TString(i, (char)(i % 128)));          }          for (size_t i = 0; i < datas.size(); ++i) { @@ -178,7 +178,7 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) {                  out.Finish();              } -            const TString resNew = TDecodedInput(&ss).ReadAll();  +            const TString resNew = TDecodedInput(&ss).ReadAll();              try {                  UNIT_ASSERT_EQUAL(resNew, res); diff --git a/library/cpp/blockcodecs/core/codecs.cpp b/library/cpp/blockcodecs/core/codecs.cpp index 072da370878..21506e812b4 100644 --- a/library/cpp/blockcodecs/core/codecs.cpp +++ b/library/cpp/blockcodecs/core/codecs.cpp @@ -61,8 +61,8 @@ namespace {          TDeque<TString> Tmp;          TNullCodec Null; -        TVector<TCodecPtr> Codecs;  -        typedef THashMap<TStringBuf, ICodec*> TRegistry;  +        TVector<TCodecPtr> Codecs; +        typedef THashMap<TStringBuf, ICodec*> TRegistry;          TRegistry Registry;          // SEARCH-8344: Global decompressed size limiter (to prevent remote DoS) @@ -82,7 +82,7 @@ TCodecList NBlockCodecs::ListAllCodecs() {      return ret;  } -TString NBlockCodecs::ListAllCodecsAsString() {  +TString NBlockCodecs::ListAllCodecsAsString() {      return JoinSeq(TStringBuf(","), ListAllCodecs());  } @@ -127,7 +127,7 @@ void ICodec::Decode(const TData& in, TBuffer& out) const {      out.Resize(Decompress(in, out.Data()));  } -void ICodec::Encode(const TData& in, TString& out) const {  +void ICodec::Encode(const TData& in, TString& out) const {      const size_t maxLen = MaxCompressedLength(in);      out.ReserveAndResize(maxLen); @@ -136,7 +136,7 @@ void ICodec::Encode(const TData& in, TString& out) const {      out.resize(actualLen);  } -void ICodec::Decode(const TData& in, TString& out) const {  +void ICodec::Decode(const TData& in, TString& out) const {      const size_t maxLen = GetDecompressedLength(in);      out.ReserveAndResize(maxLen); diff --git a/library/cpp/blockcodecs/core/codecs.h b/library/cpp/blockcodecs/core/codecs.h index 878678d5c7a..9c93c002748 100644 --- a/library/cpp/blockcodecs/core/codecs.h +++ b/library/cpp/blockcodecs/core/codecs.h @@ -2,7 +2,7 @@  #include <util/generic/buffer.h>  #include <util/generic/strbuf.h> -#include <util/generic/string.h>  +#include <util/generic/string.h>  #include <util/generic/typetraits.h>  #include <util/generic/vector.h>  #include <util/generic/yexception.h> @@ -45,25 +45,25 @@ namespace NBlockCodecs {          virtual size_t Compress(const TData& in, void* out) const = 0;          virtual size_t Decompress(const TData& in, void* out) const = 0; -        virtual TStringBuf Name() const noexcept = 0;  +        virtual TStringBuf Name() const noexcept = 0;          // some useful helpers          void Encode(const TData& in, TBuffer& out) const;          void Decode(const TData& in, TBuffer& out) const; -        void Encode(const TData& in, TString& out) const;  -        void Decode(const TData& in, TString& out) const;  +        void Encode(const TData& in, TString& out) const; +        void Decode(const TData& in, TString& out) const; -        inline TString Encode(const TData& in) const {  -            TString out;  +        inline TString Encode(const TData& in) const { +            TString out;              Encode(in, out);              return out;          } -        inline TString Decode(const TData& in) const {  -            TString out;  +        inline TString Decode(const TData& in) const { +            TString out;              Decode(in, out); @@ -78,9 +78,9 @@ namespace NBlockCodecs {      const ICodec* Codec(const TStringBuf& name);      // some aux methods -    typedef TVector<TStringBuf> TCodecList;  +    typedef TVector<TStringBuf> TCodecList;      TCodecList ListAllCodecs(); -    TString ListAllCodecsAsString();  +    TString ListAllCodecsAsString();      // SEARCH-8344: Get the size of max possible decompressed block      size_t GetMaxPossibleDecompressedLength(); diff --git a/library/cpp/blockcodecs/core/common.h b/library/cpp/blockcodecs/core/common.h index 8e1dabb593c..f05df4d3341 100644 --- a/library/cpp/blockcodecs/core/common.h +++ b/library/cpp/blockcodecs/core/common.h @@ -55,7 +55,7 @@ namespace NBlockCodecs {              return in.size();          } -        TStringBuf Name() const noexcept override {  +        TStringBuf Name() const noexcept override {              return TStringBuf("null");          }      }; @@ -98,7 +98,7 @@ namespace NBlockCodecs {              return len;          } -        inline const T* Base() const noexcept {  +        inline const T* Base() const noexcept {              return static_cast<const T*>(this);          }      }; diff --git a/library/cpp/blockcodecs/core/stream.cpp b/library/cpp/blockcodecs/core/stream.cpp index 856400b5a1d..4f7db3c32be 100644 --- a/library/cpp/blockcodecs/core/stream.cpp +++ b/library/cpp/blockcodecs/core/stream.cpp @@ -51,7 +51,7 @@ namespace {              ythrow yexception() << "can not find codec by id " << id;          } -        typedef THashMap<TCodecID, const ICodec*> TByID;  +        typedef THashMap<TCodecID, const ICodec*> TByID;          TByID ByID;      }; @@ -74,7 +74,7 @@ TCodedOutput::TCodedOutput(IOutputStream* out, const ICodec* c, size_t bufLen)      }  } -TCodedOutput::~TCodedOutput() {  +TCodedOutput::~TCodedOutput() {      try {          Finish();      } catch (...) { diff --git a/library/cpp/blockcodecs/core/stream.h b/library/cpp/blockcodecs/core/stream.h index 92ccd10333f..fd44ef88f2c 100644 --- a/library/cpp/blockcodecs/core/stream.h +++ b/library/cpp/blockcodecs/core/stream.h @@ -12,7 +12,7 @@ namespace NBlockCodecs {      class TCodedOutput: public IOutputStream {      public:          TCodedOutput(IOutputStream* out, const ICodec* c, size_t bufLen); -        ~TCodedOutput() override;  +        ~TCodedOutput() override;      private:          void DoWrite(const void* buf, size_t len) override; @@ -33,7 +33,7 @@ namespace NBlockCodecs {          TDecodedInput(IInputStream* in);          TDecodedInput(IInputStream* in, const ICodec* codec); -        ~TDecodedInput() override;  +        ~TDecodedInput() override;      private:          size_t DoUnboundedNext(const void** ptr) override; | 
