## loci.formats
Class Compression

    java.lang.Object
      loci.formats.Compression

public abstract class Compression
extends Object

A utility class for handling various compression types.

Field Summary
`protected static int` `CLEAR_CODE`
`protected static int` `CODE`
`protected static int` `DATA`
`protected static int` `EOI_CODE`
`protected static int` `RAW`
`protected static int` `RUN`
`protected static int` `SKIP_THREE`
`protected static int` `SKIP_TWO`
`protected static int` `THREE_BIT_DELTAS`
`protected static int` `TWO_BIT_DELTAS`

Constructor Summary
`Compression()`

Method Summary
`static byte[]` `deflateUncompress(byte[] input)` Decodes an Adobe Deflate (Zip) compressed image strip.
`static byte[]` `lzwCompress(byte[] input)` Encodes an image strip using the LZW compression method.
`static byte[]` `lzwUncompress(byte[] input)` Decodes an LZW-compressed image strip.
`static byte[]` `packBitsUncompress(byte[] input)` Decodes a PackBits (Macintosh RLE) compressed image.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLEAR_CODE

    protected static final int CLEAR_CODE

See Also:
  Constant Field Values

### EOI_CODE

    protected static final int EOI_CODE

See Also:
  Constant Field Values

### DATA

    protected static final int DATA

See Also:
  Constant Field Values

### CODE

    protected static final int CODE

See Also:
  Constant Field Values

### RUN

    protected static final int RUN

See Also:
  Constant Field Values

### TWO_BIT_DELTAS

    protected static final int TWO_BIT_DELTAS

See Also:
  Constant Field Values

### SKIP_TWO

    protected static final int SKIP_TWO

See Also:
  Constant Field Values

### THREE_BIT_DELTAS

    protected static final int THREE_BIT_DELTAS

See Also:
  Constant Field Values

### SKIP_THREE

    protected static final int SKIP_THREE

See Also:
  Constant Field Values

### RAW

    protected static final int RAW

See Also:
  Constant Field Values

Constructor Detail

### Compression

    public Compression()

Method Detail

### lzwCompress

    public static byte[] lzwCompress(byte[] input)

  Encodes an image strip using the LZW compression method. Adapted from the TIFF 6.0 Specification: http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf (page 61)

### deflateUncompress

    public static byte[] deflateUncompress(byte[] input)
                                    throws FormatException

  Decodes an Adobe Deflate (Zip) compressed image strip.

  Throws:
    `FormatException`

### packBitsUncompress

    public static byte[] packBitsUncompress(byte[] input)

  Decodes a PackBits (Macintosh RLE) compressed image. Adapted from the TIFF 6.0 specification, page 42.

### lzwUncompress

    public static byte[] lzwUncompress(byte[] input)
                                throws FormatException

  Decodes an LZW-compressed image strip. Adapted from the TIFF 6.0 Specification: http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf (page 61)

  Throws:
    `FormatException`