Package mil.nga.tiff.compression
Class PackbitsCompression
- java.lang.Object
-
- mil.nga.tiff.compression.PackbitsCompression
-
- All Implemented Interfaces:
CompressionDecoder
,CompressionEncoder
public class PackbitsCompression extends Object implements CompressionDecoder, CompressionEncoder
Packbits Compression- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description PackbitsCompression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decode(byte[] bytes, ByteOrder byteOrder)
Decode the bytesbyte[]
encode(byte[] bytes, ByteOrder byteOrder)
Encode the bytesboolean
rowEncoding()
True to encode on a per row basis, false to encode on a per block / strip basis
-
-
-
Method Detail
-
decode
public byte[] decode(byte[] bytes, ByteOrder byteOrder)
Decode the bytes- Specified by:
decode
in interfaceCompressionDecoder
- Parameters:
bytes
- bytes to decodebyteOrder
- byte order- Returns:
- decoded bytes
-
rowEncoding
public boolean rowEncoding()
True to encode on a per row basis, false to encode on a per block / strip basis- Specified by:
rowEncoding
in interfaceCompressionEncoder
- Returns:
- true for row encoding
-
encode
public byte[] encode(byte[] bytes, ByteOrder byteOrder)
Encode the bytes- Specified by:
encode
in interfaceCompressionEncoder
- Parameters:
bytes
- bytes to encodebyteOrder
- byte order- Returns:
- encoded block of bytes
-
-