Class ZCompressorInputStream

All Implemented Interfaces:
Closeable, AutoCloseable, InputStreamStatistics

public class ZCompressorInputStream extends LZWInputStream
Input stream that decompresses .Z files.
Since:
1.7
  • Constructor Details

    • ZCompressorInputStream

      public ZCompressorInputStream(InputStream inputStream) throws IOException
      Constructs a new instance.
      Parameters:
      inputStream - The underlying input stream.
      Throws:
      IOException - if an I/O error occurs.
    • ZCompressorInputStream

      public ZCompressorInputStream(InputStream inputStream, int memoryLimitInKiB) throws IOException
      Constructs a new instance.
      Parameters:
      inputStream - The underlying input stream.
      memoryLimitInKiB - maximum allowed estimated memory usage in kibibytes.
      Throws:
      IOException - if an I/O error occurs.
  • Method Details

    • matches

      public static boolean matches(byte[] signature, int length)
      Checks if the signature matches what is expected for a Unix compress file.
      Parameters:
      signature - the bytes to check
      length - the number of bytes to check
      Returns:
      true, if this stream is a Unix compress compressed stream, false otherwise
      Since:
      1.9