Class VSizeLongSerde


  • public class VSizeLongSerde
    extends Object
    Currently only support big endian

    An empty 4 bytes is written upon closing to avoid index out of bound exception for deserializers that shift bytes

    • Field Detail

      • SUPPORTED_SIZES

        public static final int[] SUPPORTED_SIZES
      • EMPTY

        public static final byte[] EMPTY
    • Constructor Detail

      • VSizeLongSerde

        public VSizeLongSerde()
    • Method Detail

      • getBitsForMax

        public static int getBitsForMax​(long value)
      • getSerializedSize

        public static int getSerializedSize​(int bitsPerValue,
                                            int numValues)
      • getNumValuesPerBlock

        public static int getNumValuesPerBlock​(int bitsPerValue,
                                               int blockSize)
        Block size should be power of 2, so ColumnarLongs.get(int) can be optimized using bit operators.