File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
ydb/library/yql/providers/s3/compressors Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ bool TReadBuffer::nextImpl() {
4242 do {
4343 if (InputAvailable_ == 0 && !InputExhausted_) {
4444 InputAvailable_ = Source_.read (reinterpret_cast <char *>(InBuffer.data ()), InBuffer.size ());
45+ InputSize_ = InputAvailable_;
4546 if (InputAvailable_ == 0 ) {
4647 InputExhausted_ = true ;
4748 }
@@ -52,8 +53,8 @@ bool TReadBuffer::nextImpl() {
5253 InitDecoder ();
5354 }
5455
55- auto inBuffer = const_cast <const unsigned char *>(reinterpret_cast <unsigned char *>(InBuffer.data ()));
56- auto outBuffer = reinterpret_cast <unsigned char *>(OutBuffer.data ());
56+ auto inBuffer = const_cast <const unsigned char *>(reinterpret_cast <unsigned char *>(InBuffer.data ()) + (InputSize_ - InputAvailable_) );
57+ auto outBuffer = reinterpret_cast <unsigned char *>(OutBuffer.data ()) + (OutBuffer. size () - availableOut) ;
5758
5859 SubstreamFinished_ = false ;
5960 result = BrotliDecoderDecompressStream (
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class TReadBuffer : public NDB::ReadBuffer {
2323 bool SubstreamFinished_ = false ;
2424 bool InputExhausted_ = false ;
2525 size_t InputAvailable_ = 0 ;
26+ size_t InputSize_ = 0 ;
2627
2728 void InitDecoder ();
2829 void FreeDecoder ();
You can’t perform that action at this time.
0 commit comments