When you have an incompressible block that yields the same or more than BitPackingBlockSizeXX+1, you should have a fast uncompressed mode.
You have plenty of unused space in your blocks headers:
bitlen gets 7 bits, uses 5 or 6.
ntz gets 8 bits, only uses 6.
You can either have a "magic" all ones header to indicate that the block is uncompressed or you can pack the values tighter and use one of the leftover bits.
That will make compression (after and deltaBitLenAndSign) and decompression a memcopy.
When you have an incompressible block that yields the same or more than BitPackingBlockSizeXX+1, you should have a fast uncompressed mode.
You have plenty of unused space in your blocks headers:
bitlengets 7 bits, uses 5 or 6.ntzgets 8 bits, only uses 6.You can either have a "magic" all ones header to indicate that the block is uncompressed or you can pack the values tighter and use one of the leftover bits.
That will make compression (after and
deltaBitLenAndSign) and decompression a memcopy.