diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:44 +0300 |
commit | 59e19371de37995fcb36beb16cd6ec030af960bc (patch) | |
tree | fa68e36093ebff8b805462e9e6d331fe9d348214 /library/cpp/blockcodecs/core | |
parent | 89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff) | |
download | ydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/blockcodecs/core')
-rw-r--r-- | library/cpp/blockcodecs/core/codecs.cpp | 2 | ||||
-rw-r--r-- | library/cpp/blockcodecs/core/common.h | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/blockcodecs/core/codecs.cpp b/library/cpp/blockcodecs/core/codecs.cpp index 21506e812b..3df2ca698e 100644 --- a/library/cpp/blockcodecs/core/codecs.cpp +++ b/library/cpp/blockcodecs/core/codecs.cpp @@ -1,5 +1,5 @@ #include "codecs.h" -#include "common.h" +#include "common.h" #include "register.h" #include <util/ysaveload.h> diff --git a/library/cpp/blockcodecs/core/common.h b/library/cpp/blockcodecs/core/common.h index f05df4d334..cd8e5899dd 100644 --- a/library/cpp/blockcodecs/core/common.h +++ b/library/cpp/blockcodecs/core/common.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "codecs.h" @@ -17,7 +17,7 @@ #include <util/generic/algorithm.h> #include <util/generic/mem_copy.h> -namespace NBlockCodecs { +namespace NBlockCodecs { struct TDecompressError: public TDataError { TDecompressError(int code) { *this << "cannot decompress (errcode " << code << ")"; @@ -26,14 +26,14 @@ namespace NBlockCodecs { TDecompressError(size_t exp, size_t real) { *this << "broken input (expected len: " << exp << ", got: " << real << ")"; } - }; - + }; + struct TCompressError: public TDataError { TCompressError(int code) { *this << "cannot compress (errcode " << code << ")"; } - }; - + }; + struct TNullCodec: public ICodec { size_t DecompressedLength(const TData& in) const override { return in.size(); @@ -92,8 +92,8 @@ namespace NBlockCodecs { const auto len = ReadUnaligned<ui64>(in.data()); if (!len) - return 0; - + return 0; + Base()->DoDecompress(TData(in).Skip(sizeof(len)), out, len); return len; } |