public class BlockGunzipper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static InflaterFactory |
getDefaultInflaterFactory() |
void |
setCheckCrcs(boolean check)
Allows the caller to decide whether or not to check CRCs on when uncompressing blocks.
|
static void |
setDefaultInflaterFactory(InflaterFactory inflaterFactory)
Sets the default
InflaterFactory that will be used for all instances unless specified otherwise in the constructor. |
int |
unzipBlock(byte[] uncompressedBlock,
byte[] compressedBlock,
int compressedLength)
Decompress GZIP-compressed data
|
int |
unzipBlock(byte[] uncompressedBlock,
int uncompressedBlockOffset,
byte[] compressedBlock,
int compressedBlockOffset,
int compressedLength)
Decompress GZIP-compressed data
|
public static void setDefaultInflaterFactory(InflaterFactory inflaterFactory)
InflaterFactory
that will be used for all instances unless specified otherwise in the constructor.
If this method is not called the default is a factory that will create the JDK Inflater
.inflaterFactory
- non-null default factory.public static InflaterFactory getDefaultInflaterFactory()
public void setCheckCrcs(boolean check)
public int unzipBlock(byte[] uncompressedBlock, byte[] compressedBlock, int compressedLength)
uncompressedBlock
- must be big enough to hold decompressed output.compressedBlock
- compressed data starting at offset 0compressedLength
- size of compressed data, possibly less than the size of the buffer.public int unzipBlock(byte[] uncompressedBlock, int uncompressedBlockOffset, byte[] compressedBlock, int compressedBlockOffset, int compressedLength)
uncompressedBlock
- must be big enough to hold decompressed output.uncompressedBlockOffset
- the offset into uncompressedBlock.compressedBlock
- compressed data starting at offset 0.compressedBlock
- the offset into the compressed data.compressedLength
- size of compressed data, possibly less than the size of the buffer.