public class BitPacking extends Object
| Constructor and Description |
|---|
BitPacking() |
| Modifier and Type | Method and Description |
|---|---|
static void |
packBits(long value,
int bits,
byte[] buffer,
int bufOffset,
int bitOffset)
The bit packing operation
|
static void |
unpackBits(long[] value,
int index,
int bits,
byte[] buffer,
int bufOffset,
int bitOffset)
The unpacking operation
|
public static void packBits(long value,
int bits,
byte[] buffer,
int bufOffset,
int bitOffset)
value - the value to packbits - number of bits to packbuffer - the output byte array bufferbufOffset - the byte offset in the bufferbitOffset - the bit offsetpublic static void unpackBits(long[] value,
int index,
int bits,
byte[] buffer,
int bufOffset,
int bitOffset)
value - the output arrayindex - index of the value arraybits - the number of bits to unpackbuffer - the input packed bufferbufOffset - the buffer offsetbitOffset - the bit offsetCopyright © 2015–2024 The Apache Software Foundation. All rights reserved.