Class BitPacking


  • public class BitPacking
    extends Object
    Used as part of Theta compression.
    • Constructor Detail

      • BitPacking

        public BitPacking()
    • Method Detail

      • packBits

        public static void packBits​(long value,
                                    int bits,
                                    byte[] buffer,
                                    int bufOffset,
                                    int bitOffset)
        The bit packing operation
        Parameters:
        value - the value to pack
        bits - number of bits to pack
        buffer - the output byte array buffer
        bufOffset - the byte offset in the buffer
        bitOffset - the bit offset
      • unpackBits

        public static void unpackBits​(long[] value,
                                      int index,
                                      int bits,
                                      byte[] buffer,
                                      int bufOffset,
                                      int bitOffset)
        The unpacking operation
        Parameters:
        value - the output array
        index - index of the value array
        bits - the number of bits to unpack
        buffer - the input packed buffer
        bufOffset - the buffer offset
        bitOffset - the bit offset