Package com.helger.base.codec.impl
Class RunLengthCodec
java.lang.Object
com.helger.base.codec.impl.RunLengthCodec
- All Implemented Interfaces:
IByteArrayDecoder,IByteArrayStreamDecoder,IDecoder<byte[],byte[]>
Decoder for run length encoding
- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(byte @Nullable [] aEncodedBuffer, int nOfs, int nLen, @NonNull OutputStream aOS) Decode the passed run length encoded buffer and write the decoded bytes to the output stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.base.codec.IByteArrayDecoder
getDecoded, getDecoded, getMaximumDecodedLengthMethods inherited from interface com.helger.base.codec.IByteArrayStreamDecoder
decode, getDecoded, getDecodedAsString, getDecodedAsString, getDecodedAsString, getDecodedAsString
-
Field Details
-
RUN_LENGTH_EOD
protected static final int RUN_LENGTH_EOD- See Also:
-
-
Constructor Details
-
RunLengthCodec
public RunLengthCodec()Constructor.
-
-
Method Details
-
decode
public void decode(byte @Nullable [] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @WillNotClose @NonNull OutputStream aOS) Decode the passed run length encoded buffer and write the decoded bytes to the output stream.- Specified by:
decodein interfaceIByteArrayStreamDecoder- Parameters:
aEncodedBuffer- The run length encoded buffer to be decoded. May benull.nOfs- The offset in the buffer to start decoding from.nLen- The number of bytes to decode.aOS- The output stream to write the decoded data to. May not benull.
-