@@ -148,7 +148,6 @@ public void decompress(DataInput in, int originalLength, int offset, int length,
148
148
149
149
// Read blocks that intersect with the interval we need
150
150
while (offsetInBlock < offset + length ) {
151
- bytes .bytes = ArrayUtil .grow (bytes .bytes , bytes .length + blockLength );
152
151
final int compressedLength = in .readVInt ();
153
152
if (compressedLength == 0 ) {
154
153
return ;
@@ -159,10 +158,7 @@ public void decompress(DataInput in, int originalLength, int offset, int length,
159
158
int l = Math .min (blockLength , originalLength - offsetInBlock );
160
159
bytes .bytes = ArrayUtil .grow (bytes .bytes , bytes .length + l );
161
160
162
- byte [] output = new byte [l ];
163
-
164
- final int uncompressed = (int ) Zstd .decompressByteArray (output , 0 , l , compressed , 0 , compressedLength );
165
- System .arraycopy (output , 0 , bytes .bytes , bytes .length , uncompressed );
161
+ final int uncompressed = (int ) Zstd .decompressByteArray (bytes .bytes , bytes .length , l , compressed , 0 , compressedLength );
166
162
167
163
bytes .length += uncompressed ;
168
164
offsetInBlock += blockLength ;
0 commit comments