> For S16 deltas, bias by 0x8080 , for S32 deltas, bias by 0x80808080.
> De-interleaving multi-byte integers into homogenous streams can help, particularly with weaker back-end compressors.
> TLDR:
> For floats, just reinterpret F32 as U32.
> If the floats have a mix of positive and negative, convert the sign bit to two's-complement signed S32.
> Consider lossy elimination of negative zero -0.f
> If you didn't actually want the huge precision for floats near zero, a simple lossy encoding is just to do float += constant, which works for non-negative floats where you don't know the high end of the range so you can't just use fixed point.
> TLDR:
> The best way to compress numeric data that is larger than bytes (F32,F16,S32,S16) is usually to delta them in their original size integer, then de-interleave after the delta.
> Sometimes no filter or no deinterleave is best, particularly with stronger compressors, so being able to select filter on/off per-file can give big wins.
http://cbloomrants.blogspot.com/2023/07/notes-on-float-and-m...
> TLDR:
> For S16 deltas, bias by 0x8080 , for S32 deltas, bias by 0x80808080.
> De-interleaving multi-byte integers into homogenous streams can help, particularly with weaker back-end compressors.
> TLDR:
> For floats, just reinterpret F32 as U32.
> If the floats have a mix of positive and negative, convert the sign bit to two's-complement signed S32.
> Consider lossy elimination of negative zero -0.f
> If you didn't actually want the huge precision for floats near zero, a simple lossy encoding is just to do float += constant, which works for non-negative floats where you don't know the high end of the range so you can't just use fixed point.
> TLDR:
> The best way to compress numeric data that is larger than bytes (F32,F16,S32,S16) is usually to delta them in their original size integer, then de-interleave after the delta.
> Sometimes no filter or no deinterleave is best, particularly with stronger compressors, so being able to select filter on/off per-file can give big wins.