@@ -311,34 +311,34 @@ public int decompressDirectByteBufferToByteArray(byte[] dstBuff, int dstOffset,
311
311
*/
312
312
public int decompress (ByteBuffer dstBuf , ByteBuffer srcBuf ) throws ZstdException {
313
313
int size = decompressDirectByteBuffer (dstBuf , // decompress into dstBuf
314
- dstBuf .position (), // write decompressed data at offset position()
315
- dstBuf .limit () - dstBuf .position (), // write no more than limit() - position()
316
- srcBuf , // read compressed data from srcBuf
317
- srcBuf .position (), // read starting at offset position()
318
- srcBuf .limit () - srcBuf .position ()); // read no more than limit() - position()
314
+ dstBuf .position (), // write decompressed data at offset position()
315
+ dstBuf .limit () - dstBuf .position (), // write no more than limit() - position()
316
+ srcBuf , // read compressed data from srcBuf
317
+ srcBuf .position (), // read starting at offset position()
318
+ srcBuf .limit () - srcBuf .position ()); // read no more than limit() - position()
319
319
srcBuf .position (srcBuf .limit ());
320
320
dstBuf .position (dstBuf .position () + size );
321
321
return size ;
322
322
}
323
323
324
324
public int decompress (ByteBuffer dstBuf , byte [] src ) throws ZstdException {
325
325
int size = decompressByteArrayToDirectByteBuffer (dstBuf , // decompress into dstBuf
326
- dstBuf .position (), // write decompressed data at offset position()
327
- dstBuf .limit () - dstBuf .position (), // write no more than limit() - position()
328
- src , // read compressed data from src
329
- 0 ,
330
- src .length );
326
+ dstBuf .position (), // write decompressed data at offset position()
327
+ dstBuf .limit () - dstBuf .position (), // write no more than limit() - position()
328
+ src , // read compressed data from src
329
+ 0 ,
330
+ src .length );
331
331
dstBuf .position (dstBuf .position () + size );
332
332
return size ;
333
333
}
334
334
335
335
public int decompress (byte [] dst , ByteBuffer srcBuf ) throws ZstdException {
336
336
int size = decompressDirectByteBufferToByteArray (dst , // decompress into dst
337
- 0 ,
338
- dst .length ,
339
- srcBuf , // read compressed data from srcBuf
340
- srcBuf .position (), // read starting at offset position()
341
- srcBuf .limit () - srcBuf .position ()); // read no more than limit() - position()
337
+ 0 ,
338
+ dst .length ,
339
+ srcBuf , // read compressed data from srcBuf
340
+ srcBuf .position (), // read starting at offset position()
341
+ srcBuf .limit () - srcBuf .position ()); // read no more than limit() - position()
342
342
srcBuf .position (srcBuf .limit ());
343
343
return size ;
344
344
}
0 commit comments