public abstract class BitStreamCODEC extends AbstractCODEC<byte[]>
Constructor and Description |
---|
BitStreamCODEC() |
Modifier and Type | Method and Description |
---|---|
byte[] |
co(int[] in,
int offset,
int len)
Compress.
|
int |
dec(byte[] in,
int[] out,
int outOffset,
int len)
Decompress.
|
boolean |
isIntegrated()
Returns if the CODEC is integrated, i.e.
|
protected abstract void |
read(it.unimi.dsi.io.InputBitStream ibs,
int[] out,
int offset,
int len)
Reads a BitStream to an array.
|
protected abstract void |
write(it.unimi.dsi.io.OutputBitStream obs,
int[] in,
int offset,
int len)
Write integer array to BitStream.
|
add, reset, stats
public byte[] co(int[] in, int offset, int len)
CODEC
in
- array to be compressed.offset
- offset of inlen
- number of integers to be compressedprotected abstract void write(it.unimi.dsi.io.OutputBitStream obs, int[] in, int offset, int len) throws IOException
obs
- output bit streamin
- input arrayoffset
- offset of arraylen
- number of bytes to writeIOException
- when IO errorpublic int dec(byte[] in, int[] out, int outOffset, int len)
CODEC
in
- compressed representation of an array.out
- array where to write the compressed.outOffset
- offset of outlen
- number of integers that need to be decompressedprotected abstract void read(it.unimi.dsi.io.InputBitStream ibs, int[] out, int offset, int len) throws IOException
ibs
- input bit streamout
- output arrayoffset
- array offsetlen
- number of integers to readIOException
- when IO errorpublic boolean isIntegrated()
CODEC
Copyright © 2016. All rights reserved.