Package org.jpedal.io.filter
Class RunLengthOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.jpedal.io.filter.RunLengthOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An output stream that encodes output bytes using Run Length Encoding
The encoded data shall be 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.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterOutputStream
flush, write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
RunLengthOutputStream
-
-
Method Details
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-