net.jpountz.lz4
Class LZ4FastDecompressor
- java.lang.Object
-
- net.jpountz.lz4.LZ4FastDecompressor
-
- All Implemented Interfaces:
- LZ4Decompressor
public abstract class LZ4FastDecompressor extends java.lang.Object implements LZ4Decompressor
LZ4 decompressor that requires the size of the original input to be known. UseLZ4SafeDecompressorif you only know the size of the compressed stream.Instances of this class are thread-safe.
-
-
Constructor Summary
Constructors Constructor and Description LZ4FastDecompressor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description intdecompress(byte[] src, byte[] dest)Convenience method, equivalent to callingdecompress(src, dest, dest.length).intdecompress(byte[] src, byte[] dest, int destLen)Convenience method, equivalent to callingdecompress(src, 0, dest, 0, destLen).byte[]decompress(byte[] src, int destLen)Convenience method, equivalent to callingdecompress(src, 0, destLen).abstract intdecompress(byte[] src, int srcOff, byte[] dest, int destOff, int destLen)Decompresssrc[srcOff:]intodest[destOff:destOff+destLen]and return the number of bytes read fromsrc.byte[]decompress(byte[] src, int srcOff, int destLen)Convenience method which returnssrc[srcOff:?]decompressed.voiddecompress(java.nio.ByteBuffer src, java.nio.ByteBuffer dest)Decompresssrcintodest.abstract intdecompress(java.nio.ByteBuffer src, int srcOff, java.nio.ByteBuffer dest, int destOff, int destLen)Decompresssrc[srcOff:]intodest[destOff:destOff+destLen]and return the number of bytes read fromsrc.java.lang.StringtoString()
-
-
-
Method Detail
-
decompress
public abstract int decompress(byte[] src, int srcOff, byte[] dest, int destOff, int destLen)Decompresssrc[srcOff:]intodest[destOff:destOff+destLen]and return the number of bytes read fromsrc.destLenmust be exactly the size of the decompressed data.- Specified by:
decompressin interfaceLZ4Decompressor- Parameters:
destLen- the exact size of the original input- Returns:
- the number of bytes read to restore the original input
-
decompress
public abstract int decompress(java.nio.ByteBuffer src, int srcOff, java.nio.ByteBuffer dest, int destOff, int destLen)Decompresssrc[srcOff:]intodest[destOff:destOff+destLen]and return the number of bytes read fromsrc.destLenmust be exactly the size of the decompressed data. The positions and limits of theByteBuffers remain unchanged.- Parameters:
destLen- the exact size of the original input- Returns:
- the number of bytes read to restore the original input
-
decompress
public final int decompress(byte[] src, byte[] dest, int destLen)Convenience method, equivalent to callingdecompress(src, 0, dest, 0, destLen).
-
decompress
public final int decompress(byte[] src, byte[] dest)Convenience method, equivalent to callingdecompress(src, dest, dest.length).
-
decompress
public final byte[] decompress(byte[] src, int srcOff, int destLen)Convenience method which returnssrc[srcOff:?]decompressed.Warning: this method has an important overhead due to the fact that it needs to allocate a buffer to decompress into.
Here is how this method is implemented:
final byte[] decompressed = new byte[destLen]; decompress(src, srcOff, decompressed, 0, destLen); return decompressed;
-
decompress
public final byte[] decompress(byte[] src, int destLen)Convenience method, equivalent to callingdecompress(src, 0, destLen).
-
decompress
public final void decompress(java.nio.ByteBuffer src, java.nio.ByteBuffer dest)Decompresssrcintodest.dest'sBuffer.remaining()must be exactly the size of the decompressed data. This method moves the positions of the buffers.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG