Top Description Constructors Methods
net.jpountz.lz4

public abstract Class LZ4FastDecompressor

extends Object
implements LZ4Decompressor
Class Inheritance
All Implemented Interfaces
net.jpountz.lz4.LZ4Decompressor
Known Direct Subclasses
net.jpountz.lz4.LZ4JNIFastDecompressor
Imports
java.nio.ByteBuffer

Deprecated

as a consequence of LZ4Decompressor being deprecated. See corresponding docs for further information.

LZ4 decompressor that requires the size of the original input to be known. Use LZ4SafeDecompressor if you only know the size of the compressed stream.

Instances of this class are thread-safe.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

the number of bytes read to restore the original input
decompress
(byte[] src, int srcOff, byte[] dest, int destOff, int
the exact size of the original input
destLen
)

Redeclares net.jpountz.lz4.LZ4Decompressor.decompress.

Decompress src[srcOff:] into dest[destOff:destOff+destLen] and return the number of bytes read from src.
public abstract int

Returns:

the number of bytes read to restore the original input
decompress
(ByteBuffer src, int srcOff, ByteBuffer dest, int destOff, int
the exact size of the original input
destLen
)

Decompress src[srcOff:] into dest[destOff:destOff+destLen] and return the number of bytes read from src.

public final int
decompress(byte[] src, byte[] dest, int destLen)

Convenience method, equivalent to calling decompress(src, 0, dest, 0, destLen).

public final int
decompress(byte[] src, byte[] dest)

Convenience method, equivalent to calling decompress(src, dest, dest.length).

public final byte[]
decompress(byte[] src, int srcOff, int destLen)

Convenience method which returns src[srcOff:?] decompressed.

public final byte[]
decompress(byte[] src, int destLen)

Convenience method, equivalent to calling decompress(src, 0, destLen).

public final void
decompress(ByteBuffer src, ByteBuffer dest)

Decompress src into dest.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Constructor Detail

LZ4FastDecompressorback to summary
public LZ4FastDecompressor()

Method Detail

decompressback to summary
public abstract int decompress(byte[] src, int srcOff, byte[] dest, int destOff, int destLen)

Redeclares net.jpountz.lz4.LZ4Decompressor.decompress.

Decompress src[srcOff:] into dest[destOff:destOff+destLen] and return the number of bytes read from src. destLen must be exactly the size of the decompressed data.

Parameters
destLen:int

the exact size of the original input

Returns:int

the number of bytes read to restore the original input

decompressback to summary
public abstract int decompress(ByteBuffer src, int srcOff, ByteBuffer dest, int destOff, int destLen)

Decompress src[srcOff:] into dest[destOff:destOff+destLen] and return the number of bytes read from src. destLen must be exactly the size of the decompressed data. The positions and limits of the ByteBuffers remain unchanged.

Parameters
destLen:int

the exact size of the original input

Returns:int

the number of bytes read to restore the original input

decompressback to summary
public final int decompress(byte[] src, byte[] dest, int destLen)

Convenience method, equivalent to calling decompress(src, 0, dest, 0, destLen).

decompressback to summary
public final int decompress(byte[] src, byte[] dest)

Convenience method, equivalent to calling decompress(src, dest, dest.length).

decompressback to summary
public final byte[] decompress(byte[] src, int srcOff, int destLen)

Convenience method which returns src[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;
decompressback to summary
public final byte[] decompress(byte[] src, int destLen)

Convenience method, equivalent to calling decompress(src, 0, destLen).

decompressback to summary
public final void decompress(ByteBuffer src, ByteBuffer dest)

Decompress src into dest. dest's ByteBuffer#remaining() must be exactly the size of the decompressed data. This method moves the positions of the buffers.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override