Class UnshrinkingInputStream

All Implemented Interfaces:
Closeable, AutoCloseable, InputStreamStatistics

class UnshrinkingInputStream extends LZWInputStream
Input stream that decompresses ZIP method 1 (unshrinking). A variation of the LZW algorithm, with some twists.
Since:
1.7
  • Field Details

    • MAX_CODE_SIZE

      private static final int MAX_CODE_SIZE
      See Also:
    • MAX_TABLE_SIZE

      private static final int MAX_TABLE_SIZE
      See Also:
    • isUsed

      private final boolean[] isUsed
  • Constructor Details

    • UnshrinkingInputStream

      public UnshrinkingInputStream(InputStream inputStream) throws IOException
      IOException is not actually thrown!
      Parameters:
      inputStream -
      Throws:
      IOException - IOException is not actually thrown!
  • Method Details

    • addEntry

      protected int addEntry(int previousCode, byte character) throws IOException
      Description copied from class: LZWInputStream
      Add a new entry to the dictionary.
      Specified by:
      addEntry in class LZWInputStream
      Parameters:
      previousCode - the previous code
      character - the next character to append
      Returns:
      the new code
      Throws:
      IOException - on error
    • partialClear

      private void partialClear()
    • decompressNextSymbol

      protected int decompressNextSymbol() throws IOException
      Description copied from class: LZWInputStream
      Read the next code and expand it.
      Specified by:
      decompressNextSymbol in class LZWInputStream
      Returns:
      the expanded next code, negative on EOF
      Throws:
      IOException - on error