diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/blockcodecs/core/stream.cpp | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/blockcodecs/core/stream.cpp')
-rw-r--r-- | library/cpp/blockcodecs/core/stream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/blockcodecs/core/stream.cpp b/library/cpp/blockcodecs/core/stream.cpp index 7a7422738b..4f7db3c32b 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) { |