aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/blockcodecs
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit7fe839092527589b38f014d854c51565b3c1adfa (patch)
tree309e97022d3530044b712b8f71318c78faf7856e /library/cpp/blockcodecs
parentd0d68c395c10da4cb56a1c845504570a04d7893e (diff)
downloadydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/blockcodecs')
-rw-r--r--library/cpp/blockcodecs/codecs/brotli/brotli.cpp4
-rw-r--r--library/cpp/blockcodecs/codecs/bzip/bzip.cpp2
-rw-r--r--library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp4
-rw-r--r--library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp6
-rw-r--r--library/cpp/blockcodecs/codecs/lz4/lz4.cpp6
-rw-r--r--library/cpp/blockcodecs/codecs/lzma/lzma.cpp4
-rw-r--r--library/cpp/blockcodecs/codecs/snappy/snappy.cpp2
-rw-r--r--library/cpp/blockcodecs/codecs/zlib/zlib.cpp2
-rw-r--r--library/cpp/blockcodecs/codecs/zstd/zstd.cpp6
-rw-r--r--library/cpp/blockcodecs/core/codecs.cpp2
-rw-r--r--library/cpp/blockcodecs/core/common.h4
-rw-r--r--library/cpp/blockcodecs/core/stream.cpp10
-rw-r--r--library/cpp/blockcodecs/ya.make2
13 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/blockcodecs/codecs/brotli/brotli.cpp b/library/cpp/blockcodecs/codecs/brotli/brotli.cpp
index 6e3cd971bd..4893fb7a00 100644
--- a/library/cpp/blockcodecs/codecs/brotli/brotli.cpp
+++ b/library/cpp/blockcodecs/codecs/brotli/brotli.cpp
@@ -13,7 +13,7 @@ namespace {
inline TBrotliCodec(ui32 level)
: Quality(level)
- , MyName(TStringBuf("brotli_") + ToString(level))
+ , MyName(TStringBuf("brotli_") + ToString(level))
{
}
@@ -63,5 +63,5 @@ namespace {
}
}
};
- const TBrotliRegistrar Registrar{};
+ const TBrotliRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/bzip/bzip.cpp b/library/cpp/blockcodecs/codecs/bzip/bzip.cpp
index 3a5cfdd0e9..3ca1f80daf 100644
--- a/library/cpp/blockcodecs/codecs/bzip/bzip.cpp
+++ b/library/cpp/blockcodecs/codecs/bzip/bzip.cpp
@@ -58,5 +58,5 @@ namespace {
RegisterAlias("bzip2", "bzip2-6");
}
};
- const TBZipRegistrar Registrar{};
+ const TBZipRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp b/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp
index da2831fbd2..9d836b87fb 100644
--- a/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp
+++ b/library/cpp/blockcodecs/codecs/fastlz/fastlz.cpp
@@ -34,7 +34,7 @@ namespace {
const int ret = fastlz_decompress(in.data(), in.size(), out, len);
if (ret < 0 || (size_t)ret != len) {
- ythrow TDataError() << TStringBuf("can not decompress");
+ ythrow TDataError() << TStringBuf("can not decompress");
}
}
@@ -50,5 +50,5 @@ namespace {
RegisterAlias("fastlz", "fastlz-0");
}
};
- const TFastLZRegistrar Registrar{};
+ const TFastLZRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp b/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp
index 042f031679..0e80f47cc6 100644
--- a/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp
+++ b/library/cpp/blockcodecs/codecs/legacy_zstd06/legacy_zstd06.cpp
@@ -11,13 +11,13 @@ namespace {
struct TZStd06Codec: public TAddLengthCodec<TZStd06Codec> {
inline TZStd06Codec(unsigned level)
: Level(level)
- , MyName(TStringBuf("zstd06_") + ToString(Level))
+ , MyName(TStringBuf("zstd06_") + ToString(Level))
{
}
static inline size_t CheckError(size_t ret, const char* what) {
if (ZSTD_isError(ret)) {
- ythrow yexception() << what << TStringBuf(" zstd error: ") << ZSTD_getErrorName(ret);
+ ythrow yexception() << what << TStringBuf(" zstd error: ") << ZSTD_getErrorName(ret);
}
return ret;
@@ -54,5 +54,5 @@ namespace {
}
}
};
- const TZStd06Registrar Registrar{};
+ const TZStd06Registrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/lz4/lz4.cpp b/library/cpp/blockcodecs/codecs/lz4/lz4.cpp
index fbf0fe110f..db8d9f4019 100644
--- a/library/cpp/blockcodecs/codecs/lz4/lz4.cpp
+++ b/library/cpp/blockcodecs/codecs/lz4/lz4.cpp
@@ -53,7 +53,7 @@ namespace {
}
static inline TStringBuf DPrefix() {
- return TStringBuf("fast");
+ return TStringBuf("fast");
}
};
@@ -66,7 +66,7 @@ namespace {
}
static inline TStringBuf DPrefix() {
- return TStringBuf("safe");
+ return TStringBuf("safe");
}
};
@@ -119,5 +119,5 @@ namespace {
RegisterAlias("lz4hc", "lz4-hc-safe");
}
};
- const TLz4Registrar Registrar{};
+ const TLz4Registrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/lzma/lzma.cpp b/library/cpp/blockcodecs/codecs/lzma/lzma.cpp
index 6c8d5fded4..c2c3784540 100644
--- a/library/cpp/blockcodecs/codecs/lzma/lzma.cpp
+++ b/library/cpp/blockcodecs/codecs/lzma/lzma.cpp
@@ -39,7 +39,7 @@ namespace {
inline void DoDecompress(const TData& in, void* out, size_t len) const {
if (in.size() <= LZMA_PROPS_SIZE) {
- ythrow TDataError() << TStringBuf("broken lzma stream");
+ ythrow TDataError() << TStringBuf("broken lzma stream");
}
const unsigned char* props = (const unsigned char*)in.data();
@@ -70,5 +70,5 @@ namespace {
RegisterAlias("lzma", "lzma-5");
}
};
- const TLzmaRegistrar Registrar{};
+ const TLzmaRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/snappy/snappy.cpp b/library/cpp/blockcodecs/codecs/snappy/snappy.cpp
index f6be05a05f..18e499eea1 100644
--- a/library/cpp/blockcodecs/codecs/snappy/snappy.cpp
+++ b/library/cpp/blockcodecs/codecs/snappy/snappy.cpp
@@ -48,5 +48,5 @@ namespace {
RegisterCodec(MakeHolder<TSnappyCodec>());
}
};
- const TSnappyRegistrar Registrar{};
+ const TSnappyRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/zlib/zlib.cpp b/library/cpp/blockcodecs/codecs/zlib/zlib.cpp
index cdb556c36d..8e23269f6d 100644
--- a/library/cpp/blockcodecs/codecs/zlib/zlib.cpp
+++ b/library/cpp/blockcodecs/codecs/zlib/zlib.cpp
@@ -60,5 +60,5 @@ namespace {
RegisterAlias("zlib", "zlib-6");
}
};
- const TZLibRegistrar Registrar{};
+ const TZLibRegistrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/codecs/zstd/zstd.cpp b/library/cpp/blockcodecs/codecs/zstd/zstd.cpp
index 95299b3f6d..7ea1c6371b 100644
--- a/library/cpp/blockcodecs/codecs/zstd/zstd.cpp
+++ b/library/cpp/blockcodecs/codecs/zstd/zstd.cpp
@@ -11,13 +11,13 @@ namespace {
struct TZStd08Codec: public TAddLengthCodec<TZStd08Codec> {
inline TZStd08Codec(unsigned level)
: Level(level)
- , MyName(TStringBuf("zstd08_") + ToString(Level))
+ , MyName(TStringBuf("zstd08_") + ToString(Level))
{
}
static inline size_t CheckError(size_t ret, const char* what) {
if (ZSTD_isError(ret)) {
- ythrow yexception() << what << TStringBuf(" zstd error: ") << ZSTD_getErrorName(ret);
+ ythrow yexception() << what << TStringBuf(" zstd error: ") << ZSTD_getErrorName(ret);
}
return ret;
@@ -55,5 +55,5 @@ namespace {
}
}
};
- const TZStd08Registrar Registrar{};
+ const TZStd08Registrar Registrar{};
}
diff --git a/library/cpp/blockcodecs/core/codecs.cpp b/library/cpp/blockcodecs/core/codecs.cpp
index 21506e812b..43421c1aa5 100644
--- a/library/cpp/blockcodecs/core/codecs.cpp
+++ b/library/cpp/blockcodecs/core/codecs.cpp
@@ -83,7 +83,7 @@ TCodecList NBlockCodecs::ListAllCodecs() {
}
TString NBlockCodecs::ListAllCodecsAsString() {
- return JoinSeq(TStringBuf(","), ListAllCodecs());
+ return JoinSeq(TStringBuf(","), ListAllCodecs());
}
void NBlockCodecs::RegisterCodec(TCodecPtr codec) {
diff --git a/library/cpp/blockcodecs/core/common.h b/library/cpp/blockcodecs/core/common.h
index f05df4d334..8da81b45f9 100644
--- a/library/cpp/blockcodecs/core/common.h
+++ b/library/cpp/blockcodecs/core/common.h
@@ -56,7 +56,7 @@ namespace NBlockCodecs {
}
TStringBuf Name() const noexcept override {
- return TStringBuf("null");
+ return TStringBuf("null");
}
};
@@ -83,7 +83,7 @@ namespace NBlockCodecs {
WriteUnaligned<ui64>(ptr, (ui64) in.size());
- return Base()->DoCompress(!in ? TData(TStringBuf("")) : in, ptr + 1) + sizeof(*ptr);
+ return Base()->DoCompress(!in ? TData(TStringBuf("")) : in, ptr + 1) + sizeof(*ptr);
}
size_t Decompress(const TData& in, void* out) const override {
diff --git a/library/cpp/blockcodecs/core/stream.cpp b/library/cpp/blockcodecs/core/stream.cpp
index 4f7db3c32b..7a7422738b 100644
--- a/library/cpp/blockcodecs/core/stream.cpp
+++ b/library/cpp/blockcodecs/core/stream.cpp
@@ -12,7 +12,7 @@
using namespace NBlockCodecs;
namespace {
- constexpr size_t MAX_BUF_LEN = 128 * 1024 * 1024;
+ constexpr size_t MAX_BUF_LEN = 128 * 1024 * 1024;
typedef ui16 TCodecID;
typedef ui64 TBlockLen;
@@ -55,11 +55,11 @@ namespace {
TByID ByID;
};
- TCodecID CodecID(const ICodec* c) {
+ TCodecID CodecID(const ICodec* c) {
return TIds::CodecID(c);
}
- const ICodec* CodecByID(TCodecID id) {
+ const ICodec* CodecByID(TCodecID id) {
return Singleton<TIds>()->Find(id);
}
}
@@ -70,7 +70,7 @@ TCodedOutput::TCodedOutput(IOutputStream* out, const ICodec* c, size_t bufLen)
, S_(out)
{
if (bufLen > MAX_BUF_LEN) {
- ythrow yexception() << TStringBuf("too big buffer size: ") << bufLen;
+ ythrow yexception() << TStringBuf("too big buffer size: ") << bufLen;
}
}
@@ -198,7 +198,7 @@ size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
auto codec = CodecByID(codecId);
if (C_) {
- Y_ENSURE(C_->Name() == codec->Name(), TStringBuf("incorrect stream codec"));
+ Y_ENSURE(C_->Name() == codec->Name(), TStringBuf("incorrect stream codec"));
}
if (codec->DecompressedLength(block) > MAX_BUF_LEN) {
diff --git a/library/cpp/blockcodecs/ya.make b/library/cpp/blockcodecs/ya.make
index b8f03d5421..acda744030 100644
--- a/library/cpp/blockcodecs/ya.make
+++ b/library/cpp/blockcodecs/ya.make
@@ -22,6 +22,6 @@ SRCS(
END()
-RECURSE_FOR_TESTS(
+RECURSE_FOR_TESTS(
ut
)