Encoder
public final class PackBitsEncoder extends Object implements Encoder
Header byte | Data |
---|---|
0 to 127 | 1 + n literal bytes of data |
0 to -127 | One byte of data, repeated 1 - n times in the decompressed output |
-128 | No operation |
Constructor | Description |
---|---|
PackBitsEncoder() |
Creates a
PackBitsEncoder . |
Modifier and Type | Method | Description |
---|---|---|
void |
encode(OutputStream stream,
ByteBuffer buffer) |
Encodes up to
buffer.remaining() bytes into the given input stream,
from the given buffer. |
public void encode(OutputStream stream, ByteBuffer buffer) throws IOException
Encoder
buffer.remaining()
bytes into the given input stream,
from the given buffer.encode
in interface Encoder
stream
- the output stream to encode data tobuffer
- buffer to read data fromIOException
- if an I/O error occursCopyright © 2018. All rights reserved.