diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 9123176b341b6f2658cff5132482b8237c1416c8 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/blockcodecs/core/common.h | |
parent | 59e19371de37995fcb36beb16cd6ec030af960bc (diff) | |
download | ydb-9123176b341b6f2658cff5132482b8237c1416c8.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/blockcodecs/core/common.h')
-rw-r--r-- | library/cpp/blockcodecs/core/common.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/blockcodecs/core/common.h b/library/cpp/blockcodecs/core/common.h index cd8e5899dd..f05df4d334 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; } |