public class LZWCodec extends AbstractCodec
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LZWCodec.AbstractLZWDictionary |
protected static class |
LZWCodec.LZWDecodeDictionary |
protected static class |
LZWCodec.LZWEncodeDictionary |
protected static class |
LZWCodec.LZWNode
A single LZW node
|
| Constructor and Description |
|---|
LZWCodec() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decode(byte[] aEncodedBuffer)
Decode a byte array.
|
static byte[] |
decodeLZW(byte[] aEncodedBuffer) |
static void |
decodeLZW(InputStream aEncodedIS,
OutputStream aOS) |
byte[] |
encode(byte[] aBuffer)
Encode a byte array.
|
static byte[] |
encodeLZW(byte[] aBuffer) |
static void |
encodeLZW(byte[] aBuffer,
OutputStream aOS)
LZW-encode the passed byte array to the passed output stream
|
decode, encode@Nullable public byte[] decode(@Nullable byte[] aEncodedBuffer)
IByteArrayDecoderaEncodedBuffer - The byte array to be decoded. May not be null.null if the parameter was
null.public static void decodeLZW(@Nonnull@WillNotClose InputStream aEncodedIS, @Nonnull@WillNotClose OutputStream aOS)
@Nullable public byte[] encode(@Nullable byte[] aBuffer)
IByteArrayEncoderaBuffer - The byte array to be encoded. May be null.null if the parameter was
null.public static void encodeLZW(@Nullable byte[] aBuffer, @Nonnull@WillNotClose OutputStream aOS)
aBuffer - The buffer to be encoded. May be null in which case
nothing happens.aOS - The output stream to encode the content to. The output stream is not
closed after encoding is done! May not be null.Copyright © 2006–2014 phloc systems. All rights reserved.