Buffer using the inflate algorithm.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final BufferChecksum | |
| private boolean | |
| private final boolean | |
| private final byte[] | |
| private static final int | |
| private static final int | |
| private static final int | |
| private boolean | |
| private int | |
| private static final int | |
| private static final int | |
| private ZlibDecompressor. | |
| private Inflater | |
| private final int | maxAllocation
Maximum allowed size of the decompression buffer. |
| private int |
| Access | Constructor and Description |
|---|---|
| private | ZlibDecompressor(ZlibWrapper wrapper, byte[] dictionary, boolean decompressConcatenated, int maxAllocation)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Buffer | decompress(Buffer
the in, BufferAllocator Buffer that contains the data to be decompressed.the allocator)BufferAllocator that is used to allocate a new buffer (if needed) to write the
decompressed bytes too.Implements io. Buffer and decompress into a new Buffer that will be
allocated (if needed) from the BufferAllocator.
|
| protected void | |
| private boolean | |
| public boolean | isClosed()
Implements io. true if the decompressor was closed, false otherwise.
|
| public boolean | isFinished()
Implements io. true if the decompressor was finish.
|
| private static boolean | |
| public static Supplier | Returns: the factory.Creates a zlib decompressor factory with the default wrapper ( |
| public static Supplier | Returns: the factory.Maximum size of the decompression buffer. Must be >= 0.
If zero, maximum size is decided by the maxAllocation)BufferAllocator.Creates a zlib decompressor factory with the default wrapper ( |
| public static Supplier | Returns: the factory.Creates a zlib decompressor factory with the specified preset dictionary. |
| public static Supplier | Returns: the factory.Maximum size of the decompression buffer. Must be >= 0.
If zero, maximum size is decided by the maxAllocation)BufferAllocator.Creates zlib decompressor factory with the specified preset dictionary and maximum buffer allocation. |
| public static Supplier | Returns: the factory.Creates zlib decompressor factory with the specified wrapper. |
| public static Supplier | Returns: the factory.Maximum size of the decompression buffer. Must be >= 0.
If zero, maximum size is decided by the maxAllocation)BufferAllocator.Creates zlib decompressor factory with the specified wrapper and maximum buffer allocation. |
| public static Supplier | |
| public static Supplier | |
| public static Supplier | |
| public static Supplier | |
| private static Supplier | newFactory(ZlibWrapper wrapper, byte[] dictionary, boolean decompressConcatenated, int maxAllocation)
|
| protected Buffer | prepareDecompressBuffer(BufferAllocator allocator, Buffer buffer, int preferredSize)
Allocate or expand the decompression buffer, without exceeding the maximum allocation. |
| private boolean | Returns: true if the footer could be read, false if the read could not be performed as
the input Buffer doesn't have enough readable bytes (8 bytes).the input. in)Read the GZIP footer. |
| private boolean | |
| private boolean | Returns: true if the operation is complete and we can move to the next state, false if
we need to retry again once we have more readable bytes.the input in, int the mask that should be present in the flagMask)flags when we need to skip bytes.Skip bytes in the input if needed until we find the end marker |
| private boolean | |
| private boolean |
| closed | back to summary |
|---|---|
| private boolean closed | |
| crc | back to summary |
|---|---|
| private final BufferChecksum crc | |
| decideZlibOrNone | back to summary |
|---|---|
| private boolean decideZlibOrNone | |
| decompressConcatenated | back to summary |
|---|---|
| private final boolean decompressConcatenated | |
| dictionary | back to summary |
|---|---|
| private final byte[] dictionary | |
| FCOMMENT | back to summary |
|---|---|
| private static final int FCOMMENT | |
| FEXTRA | back to summary |
|---|---|
| private static final int FEXTRA | |
| FHCRC | back to summary |
|---|---|
| private static final int FHCRC | |
| finished | back to summary |
|---|---|
| private boolean finished | |
| flags | back to summary |
|---|---|
| private int flags | |
| FNAME | back to summary |
|---|---|
| private static final int FNAME | |
| FRESERVED | back to summary |
|---|---|
| private static final int FRESERVED | |
| gzipState | back to summary |
|---|---|
| private ZlibDecompressor. | |
| inflater | back to summary |
|---|---|
| private Inflater inflater | |
| maxAllocation | back to summary |
|---|---|
| private final int maxAllocation Maximum allowed size of the decompression buffer. | |
| xlen | back to summary |
|---|---|
| private int xlen | |
| ZlibDecompressor | back to summary |
|---|---|
| private ZlibDecompressor(ZlibWrapper wrapper, byte[] dictionary, boolean decompressConcatenated, int maxAllocation) | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. Close the decompressor. After this method was called
| |
| decompress | back to summary |
|---|---|
| public Buffer decompress(Buffer in, BufferAllocator allocator) throws DecompressionException Implements io. Doc from io. This method will read from the input isFinished() is false
input
| |
| decompressionBufferExhausted | back to summary |
|---|---|
| protected void decompressionBufferExhausted(Buffer buffer) | |
| handleGzipFooter | back to summary |
|---|---|
| private boolean handleGzipFooter(Buffer in) | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements io. Doc from io. Return | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() Implements io. Doc from io. Returns
| |
| looksLikeZlib | back to summary |
|---|---|
| private static boolean looksLikeZlib(short cmf_flg) | |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib decompressor factory with the default wrapper (
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib decompressor factory with the default wrapper (
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib decompressor factory with the specified preset dictionary. The wrapper
is always
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates zlib decompressor factory with the specified preset dictionary and maximum buffer allocation.
The wrapper is always
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates zlib decompressor factory with the specified wrapper.
Be aware that only
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates zlib decompressor factory with the specified wrapper and maximum buffer allocation.
Be aware that only
| |
| newFactory | back to summary |
|---|---|
| public static Supplier | |
| newFactory | back to summary |
|---|---|
| public static Supplier | |
| newFactory | back to summary |
|---|---|
| public static Supplier | |
| newFactory | back to summary |
|---|---|
| public static Supplier | |
| newFactory | back to summary |
|---|---|
| private static Supplier | |
| prepareDecompressBuffer | back to summary |
|---|---|
| protected Buffer prepareDecompressBuffer(BufferAllocator allocator, Buffer buffer, int preferredSize) Allocate or expand the decompression buffer, without exceeding the maximum allocation.
Calls | |
| readGZIPFooter | back to summary |
|---|---|
| private boolean readGZIPFooter(Buffer in) Read the GZIP footer. | |
| readGZIPHeader | back to summary |
|---|---|
| private boolean readGZIPHeader(Buffer in) | |
| skipIfNeeded | back to summary |
|---|---|
| private boolean skipIfNeeded(Buffer in, int flagMask) Skip bytes in the input if needed until we find the end marker
| |
| verifyCrc | back to summary |
|---|---|
| private boolean verifyCrc(Buffer in) Verifies CRC. | |
| verifyCrc16 | back to summary |
|---|---|
| private boolean verifyCrc16(Buffer in) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. | |
| public static final ZlibDecompressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ZlibDecompressor. | |
| public static ZlibDecompressor. |
| FLG_READ | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| FOOTER_START | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| HEADER_END | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| HEADER_START | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| PROCESS_FHCRC | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| SKIP_COMMENT | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| SKIP_FNAME | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| XLEN_READ | back to summary |
|---|---|
| public static final ZlibDecompressor. | |
| GzipState | back to summary |
|---|---|
| private GzipState() | |
| valueOf | back to summary |
|---|---|
| public static ZlibDecompressor. | |
| values | back to summary |
|---|---|
| public static ZlibDecompressor. | |