diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /library/cpp/streams/bzip2/bzip2.cpp | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/streams/bzip2/bzip2.cpp')
-rw-r--r-- | library/cpp/streams/bzip2/bzip2.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/streams/bzip2/bzip2.cpp b/library/cpp/streams/bzip2/bzip2.cpp index 2bb8592017..bccc5c6807 100644 --- a/library/cpp/streams/bzip2/bzip2.cpp +++ b/library/cpp/streams/bzip2/bzip2.cpp @@ -19,13 +19,13 @@ public: } inline void Init() { - if (BZ2_bzDecompressInit(&BzStream_, 0, 0) != BZ_OK) { + if (BZ2_bzDecompressInit(&BzStream_, 0, 0) != BZ_OK) { ythrow TBZipDecompressError() << "can not init bzip engine"; } } inline void Clear() noexcept { - BZ2_bzDecompressEnd(&BzStream_); + BZ2_bzDecompressEnd(&BzStream_); } inline size_t Read(void* buf, size_t size) { @@ -39,7 +39,7 @@ public: } } - switch (BZ2_bzDecompress(&BzStream_)) { + switch (BZ2_bzDecompress(&BzStream_)) { case BZ_STREAM_END: { Clear(); Init(); @@ -93,7 +93,7 @@ public: { Zero(BzStream_); - if (BZ2_bzCompressInit(&BzStream_, level, 0, 0) != BZ_OK) { + if (BZ2_bzCompressInit(&BzStream_, level, 0, 0) != BZ_OK) { ythrow TBZipCompressError() << "can not init bzip engine"; } @@ -102,7 +102,7 @@ public: } inline ~TImpl() { - BZ2_bzCompressEnd(&BzStream_); + BZ2_bzCompressEnd(&BzStream_); } inline void Write(const void* buf, size_t size) { @@ -115,7 +115,7 @@ public: }; while (BzStream_.avail_in) { - const int ret = BZ2_bzCompress(&BzStream_, BZ_RUN); + const int ret = BZ2_bzCompress(&BzStream_, BZ_RUN); switch (ret) { case BZ_RUN_OK: @@ -142,14 +142,14 @@ public: } inline void Finish() { - int ret = BZ2_bzCompress(&BzStream_, BZ_FINISH); + int ret = BZ2_bzCompress(&BzStream_, BZ_FINISH); while (ret != BZ_STREAM_END) { Stream_->Write(TmpBuf(), TmpBufLen() - BzStream_.avail_out); BzStream_.next_out = TmpBuf(); BzStream_.avail_out = TmpBufLen(); - ret = BZ2_bzCompress(&BzStream_, BZ_FINISH); + ret = BZ2_bzCompress(&BzStream_, BZ_FINISH); } Stream_->Write(TmpBuf(), TmpBufLen() - BzStream_.avail_out); |