Class UnshrinkingInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.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
    • Constructor Detail

      • UnshrinkingInputStream

        public UnshrinkingInputStream​(java.io.InputStream inputStream)
                               throws java.io.IOException
        IOException is not actually thrown!
        Parameters:
        inputStream -
        Throws:
        java.io.IOException - IOException is not actually thrown!
    • Method Detail

      • addEntry

        protected int addEntry​(int previousCode,
                               byte character)
                        throws java.io.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:
        java.io.IOException - on error
      • partialClear

        private void partialClear()
      • decompressNextSymbol

        protected int decompressNextSymbol()
                                    throws java.io.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:
        java.io.IOException - on error