The algorithm is described in the ZIP File Format Specification.
| Modifier and Type | Field and Description |
|---|---|
| private BitStream | bits
The stream of bits read from the input stream |
| private final CircularBuffer | buffer
Output buffer holding the decompressed data |
| private final int | dictionarySize
The size of the sliding dictionary (4K or 8K) |
| private BinaryTree | distanceTree
The binary tree containing the 64 encoded distances |
| private final InputStream | in
The underlying stream containing the compressed data |
| private BinaryTree | lengthTree
The binary tree containing the 64 encoded lengths |
| private BinaryTree | literalTree
The binary tree containing the 256 encoded literals (null when only two trees are used) |
| private final int | |
| private final int | numberOfTrees
The number of Shannon-Fano trees (2 or 3) |
| private long | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv | ExplodingInputStream(final int
the size of the sliding dictionary (4096 or 8192) dictionarySize, final int the number of trees (2 or 3) numberOfTrees, final InputStream the compressed data stream in)Constructs a new stream decompressing the content of the specified stream using the explode algorithm. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| private void | |
| public long | getCompressedCount()
Implements org. |
| public long | getUncompressedCount()
Implements org. |
| private void | |
| public int | read()
Implements abstract java. |
| bits | back to summary |
|---|---|
| private BitStream bits The stream of bits read from the input stream | |
| buffer | back to summary |
|---|---|
| private final CircularBuffer buffer Output buffer holding the decompressed data | |
| dictionarySize | back to summary |
|---|---|
| private final int dictionarySize The size of the sliding dictionary (4K or 8K) | |
| distanceTree | back to summary |
|---|---|
| private BinaryTree distanceTree The binary tree containing the 64 encoded distances | |
| in | back to summary |
|---|---|
| private final InputStream in The underlying stream containing the compressed data | |
| lengthTree | back to summary |
|---|---|
| private BinaryTree lengthTree The binary tree containing the 64 encoded lengths | |
| literalTree | back to summary |
|---|---|
| private BinaryTree literalTree The binary tree containing the 256 encoded literals (null when only two trees are used) | |
| minimumMatchLength | back to summary |
|---|---|
| private final int minimumMatchLength | |
| numberOfTrees | back to summary |
|---|---|
| private final int numberOfTrees The number of Shannon-Fano trees (2 or 3) | |
| treeSizes | back to summary |
|---|---|
| private long treeSizes | |
| uncompressedCount | back to summary |
|---|---|
| private long uncompressedCount | |
| ExplodingInputStream | back to summary |
|---|---|
| pack-priv ExplodingInputStream(final int dictionarySize, final int numberOfTrees, final InputStream in) Constructs a new stream decompressing the content of the specified stream using the explode algorithm.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| fillBuffer | back to summary |
|---|---|
| private void fillBuffer() throws IOException Fill the sliding dictionary with more data.
| |
| getCompressedCount | back to summary |
|---|---|
| public long getCompressedCount() Implements org. Doc from org. Gets the amount of raw or compressed bytes read by the stream.
| |
| getUncompressedCount | back to summary |
|---|---|
| public long getUncompressedCount() Implements org. Doc from org. Gets the amount of decompressed bytes returned by the stream.
| |
| init | back to summary |
|---|---|
| private void init() throws IOException Reads the encoded binary trees and prepares the bit stream. | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |