diff options
author | vmordovin <vmordovin@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
commit | 7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch) | |
tree | 17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /util/stream/zlib.cpp | |
parent | 466f96709329ff77ded50177df94d1893a226c00 (diff) | |
download | ydb-7c7f9bbcf57e15838d15afa94b31d8254b5d7776.tar.gz |
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/stream/zlib.cpp')
-rw-r--r-- | util/stream/zlib.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/stream/zlib.cpp b/util/stream/zlib.cpp index 60f4e9439f..6f6322c123 100644 --- a/util/stream/zlib.cpp +++ b/util/stream/zlib.cpp @@ -356,25 +356,25 @@ TZLibCompress::~TZLibCompress() { } void TZLibCompress::DoWrite(const void* buf, size_t size) { - if (!Impl_) { + if (!Impl_) { ythrow TZLibCompressorError() << "can not write to finished zlib stream"; - } - + } + Impl_->Write(buf, size); } void TZLibCompress::DoFlush() { if (Impl_) { - Impl_->Flush(); - } + Impl_->Flush(); + } } void TZLibCompress::DoFinish() { - THolder<TImpl> impl(Impl_.Release()); - + THolder<TImpl> impl(Impl_.Release()); + if (impl) { - impl->Finish(); - } + impl->Finish(); + } } TBufferedZLibDecompress::~TBufferedZLibDecompress() = default; |