Class RunLengthInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.jpedal.io.filter.RunLengthInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class RunLengthInputStream extends FilterInputStream
An input stream that lazily decodes runlength encoded data from the wrapped stream

The data stream in Run Length Encoding will consist of a sequence of runs, where each run shall consist of a length byte followed by 1 to 128 bytes of data. If the length byte is in the range 0 to 127, the following length + 1 (1 to 128) bytes shall be copied literally during decompression. If length is in the range 129 to 255, the following single byte shall be copied 257 - length (2 to 128) times during decompression. A length value of 128 shall denote EOD.
- PDF Spec ISO 32000-2