aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/streams
diff options
context:
space:
mode:
authorkulikov <kulikov@yandex-team.ru>2022-02-10 16:49:34 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:34 +0300
commitc707901605d7b7c6cba0998cd52e1ae619c97762 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/streams
parent65e5266709e7ff94b14ae128309e229de714b0df (diff)
downloadydb-c707901605d7b7c6cba0998cd52e1ae619c97762.tar.gz
Restoring authorship annotation for <kulikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/streams')
-rw-r--r--library/cpp/streams/brotli/brotli.cpp6
-rw-r--r--library/cpp/streams/brotli/brotli_ut.cpp34
2 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/streams/brotli/brotli.cpp b/library/cpp/streams/brotli/brotli.cpp
index a5536eff99..38052cb688 100644
--- a/library/cpp/streams/brotli/brotli.cpp
+++ b/library/cpp/streams/brotli/brotli.cpp
@@ -139,7 +139,7 @@ public:
ui8* outBuffer = static_cast<ui8*>(buffer);
size_t availableOut = size;
- size_t decompressedSize = 0;
+ size_t decompressedSize = 0;
BrotliDecoderResult result;
do {
@@ -163,7 +163,7 @@ public:
&outBuffer,
nullptr);
- decompressedSize = size - availableOut;
+ decompressedSize = size - availableOut;
SubstreamFinished_ = (result == BROTLI_DECODER_RESULT_SUCCESS);
if (result == BROTLI_DECODER_RESULT_ERROR) {
@@ -175,7 +175,7 @@ public:
"Buffer passed to read in Brotli decoder is too small");
break;
}
- } while (decompressedSize == 0 && result == BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT && !InputExhausted_);
+ } while (decompressedSize == 0 && result == BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT && !InputExhausted_);
if (!SubstreamFinished_ && decompressedSize == 0) {
ythrow yexception() << "Input stream is incomplete";
diff --git a/library/cpp/streams/brotli/brotli_ut.cpp b/library/cpp/streams/brotli/brotli_ut.cpp
index fb4372c4a5..aeb2e284dc 100644
--- a/library/cpp/streams/brotli/brotli_ut.cpp
+++ b/library/cpp/streams/brotli/brotli_ut.cpp
@@ -41,23 +41,23 @@ Y_UNIT_TEST_SUITE(TBrotliTestSuite) {
TestCase("hello world");
}
- Y_UNIT_TEST(TestFlush) {
- TStringStream ss;
- TBrotliCompress compressStream(&ss);
- TBrotliDecompress decompressStream(&ss);
-
- for (size_t i = 0; i < 3; ++i) {
- TString s = GenerateRandomString(1 << 15);
- compressStream.Write(s.data(), s.size());
- compressStream.Flush();
-
- TString r(s.size(), '*');
- decompressStream.Load((char*)r.data(), r.size());
-
- UNIT_ASSERT_VALUES_EQUAL(s, r);
- }
- }
-
+ Y_UNIT_TEST(TestFlush) {
+ TStringStream ss;
+ TBrotliCompress compressStream(&ss);
+ TBrotliDecompress decompressStream(&ss);
+
+ for (size_t i = 0; i < 3; ++i) {
+ TString s = GenerateRandomString(1 << 15);
+ compressStream.Write(s.data(), s.size());
+ compressStream.Flush();
+
+ TString r(s.size(), '*');
+ decompressStream.Load((char*)r.data(), r.size());
+
+ UNIT_ASSERT_VALUES_EQUAL(s, r);
+ }
+ }
+
Y_UNIT_TEST(TestSeveralStreams) {
auto s1 = GenerateRandomString(1 << 15);
auto s2 = GenerateRandomString(1 << 15);