Add tests, fix spelling and omissions · luben/zstd-jni@dbb8bcd (original) (raw)

`@@ -724,7 +724,7 @@ public static long decompressedSize(byte[] src) {

`

724

724

` * @return the number of bytes of the original buffer

`

725

725

` * 0 if the original size is not known

`

726

726

` * @deprecated

`

727

``

`` -

``

``

727

`` +

``

728

728

` */

`

729

729

`@Deprecated

`

730

730

`public static native long decompressedDirectByteBufferSize(ByteBuffer src, int srcPosition, int srcSize, boolean magicless);

`

`@@ -740,7 +740,7 @@ public static long decompressedSize(byte[] src) {

`

740

740

` * 0 if the original size is not known

`

741

741

` * negative if there is an error decoding the frame header

`

742

742

` */

`

743

``

`-

public static native long getDirectByteBuferFrameContentSize(ByteBuffer src, int srcPosition, int srcSize, boolean magicless);

`

``

743

`+

public static native long getDirectByteBufferFrameContentSize(ByteBuffer src, int srcPosition, int srcSize, boolean magicless);

`

744

744

``

745

745

`/**

`

746

746

` * Return the original size of a compressed buffer (if known)

`

`@@ -751,7 +751,7 @@ public static long decompressedSize(byte[] src) {

`

751

751

` * @return the number of bytes of the original buffer

`

752

752

` * 0 if the original size is not known

`

753

753

` * @deprecated

`

754

``

`` -

``

``

754

`` +

``

755

755

` */

`

756

756

`@Deprecated

`

757

757

`public static long decompressedDirectByteBufferSize(ByteBuffer src, int srcPosition, int srcSize) {

`

`@@ -768,8 +768,8 @@ public static long decompressedDirectByteBufferSize(ByteBuffer src, int srcPosit

`

768

768

` * 0 if the original size is not known

`

769

769

` * negative if there is an error decoding the frame header

`

770

770

` */

`

771

``

`-

public static long getDirectByteBuferFrameContentSize(ByteBuffer src, int srcPosition, int srcSize) {

`

772

``

`-

return getDirectByteBuferFrameContentSize(src, srcPosition, srcSize, false);

`

``

771

`+

public static long getDirectByteBufferFrameContentSize(ByteBuffer src, int srcPosition, int srcSize) {

`

``

772

`+

return getDirectByteBufferFrameContentSize(src, srcPosition, srcSize, false);

`

773

773

` }

`

774

774

``

775

775

`/**

`

`@@ -1368,11 +1368,28 @@ public static byte[] decompress(byte[] src, byte[] dict, int originalSize) {

`

1368

1368

` * end.

`

1369

1369

` * @return the number of bytes of the original buffer

`

1370

1370

` * 0 if the original size is not known

`

``

1371

`+

`

``

1372

`` +

``

1371

1373

` */

`

``

1374

`+

@Deprecated

`

1372

1375

`public static long decompressedSize(ByteBuffer srcBuf) {

`

1373

1376

`return decompressedDirectByteBufferSize(srcBuf, srcBuf.position(), srcBuf.limit() - srcBuf.position());

`

1374

1377

` }

`

1375

1378

``

``

1379

`+

/**

`

``

1380

`+

`

``

1381

`+

`

``

1382

`+

`

``

1383

`+

`

``

1384

`+

`

``

1385

`+

`

``

1386

`+

`

``

1387

`+

`

``

1388

`+

*/

`

``

1389

`+

public static long getFrameContentSize(ByteBuffer srcBuf) {

`

``

1390

`+

return getDirectByteBufferFrameContentSize(srcBuf, srcBuf.position(), srcBuf.limit() - srcBuf.position());

`

``

1391

`+

}

`

``

1392

+

1376

1393

`/**

`

1377

1394

` * Decompress data

`

1378

1395

` *

`