public static class RiceCompressor.ShortRiceCompressor extends RiceCompressor<java.nio.ShortBuffer>
RiceCompressor.ByteRiceCompressor, RiceCompressor.DoubleRiceCompressor, RiceCompressor.FloatRiceCompressor, RiceCompressor.IntRiceCompressor, RiceCompressor.ShortRiceCompressor
Constructor and Description |
---|
ShortRiceCompressor(RiceCompressOption option) |
Modifier and Type | Method and Description |
---|---|
boolean |
compress(java.nio.ShortBuffer buffer,
java.nio.ByteBuffer writeBuffer)
compress the buffer into the byte buffer.
|
void |
decompress(java.nio.ByteBuffer readBuffer,
java.nio.ShortBuffer buffer)
Decompress the byte buffer and restore the buffer from it, again enough
space must already be allocated.
|
protected int |
nextPixel() |
protected void |
nextPixel(int pixel) |
compress, decompressBuffer
public ShortRiceCompressor(RiceCompressOption option)
public boolean compress(java.nio.ShortBuffer buffer, java.nio.ByteBuffer writeBuffer)
ICompressor
buffer
- the buffer to compress.writeBuffer
- the compressed datapublic void decompress(java.nio.ByteBuffer readBuffer, java.nio.ShortBuffer buffer)
ICompressor
readBuffer
- the compressed databuffer
- the buffer to fill with the uncompressed data.protected int nextPixel()
nextPixel
in class RiceCompressor<java.nio.ShortBuffer>
protected void nextPixel(int pixel)
nextPixel
in class RiceCompressor<java.nio.ShortBuffer>