# Class UncompressInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
uk.ac.starlink.util.UncompressInputStream

All Implemented Interfaces:
  `Closeable, AutoCloseable`

public class UncompressInputStream extends FilterInputStream
This class decompresses an input stream containing data compressed with the unix "compress" utility (LZC, a LZW variant). This code is based heavily on the unlzw.c code in gzip-1.2.4 (written by Peter Jannesen) and the original compress code.

Version:
  0.3-3 06/05/2001
Author:
  Ronald Tschalär, Unidata Program Center

## Field Summary

### Fields inherited from class FilterInputStream

`in`

## Constructor Summary

Constructors
Constructor
Description
`UncompressInputStream(InputStream is)`

## Method Summary

Modifier and Type
Method
Description
`int`
`available()`
`static void`
`main(String[] args)`
`boolean`
`markSupported()`
This stream does not support mark/reset on the stream.
`int`
`read()`
`int`
`read(byte[] buf, int off, int len)`
`long`
`skip(long num)`

### Methods inherited from class FilterInputStream

`close, mark, read, reset`

### Methods inherited from class InputStream

`nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### UncompressInputStream

public UncompressInputStream(InputStream is) throws IOException

Parameters:
  `is` - the input stream to decompress
Throws:
  `IOException` - if the header is malformed

## Method Details

### read

public int read() throws IOException

Overrides:
  `read` in class `FilterInputStream`
Throws:
  `IOException`

### read

public int read(byte[] buf, int off, int len) throws IOException

Overrides:
  `read` in class `FilterInputStream`
Throws:
  `IOException`

### skip

public long skip(long num) throws IOException

Overrides:
  `skip` in class `FilterInputStream`
Throws:
  `IOException`

### available

public int available() throws IOException

Overrides:
  `available` in class `FilterInputStream`
Throws:
  `IOException`

### markSupported

public boolean markSupported()
This stream does not support mark/reset on the stream.

Overrides:
  `markSupported` in class `FilterInputStream`
Returns:
  false

### main

public static void main(String[] args) throws Exception

Throws:
  `Exception`