These are chat archives for HdrHistogram/HdrHistogram
@mikeb01 was looking at your C code for the zigzag encoding and was wondering if this was correct:
data_index += zig_zag_encode_i64(&encoded->counts[data_index], htole64(-zeros));
data_index += zig_zag_encode_i64(&encoded->counts[data_index], htole64(value));
I was puzzled by why the need to convert the value to le since the function called operates on the cpu value (which requires native encoding of the value)?
The code will work fine on LE (where the macro is a no-op) but should break on BE architecture. Seems like htole64 should not be used...
If you don't mind I'll copy over your 2 zigzag encode/decode functions as I will need them in the C extension for python.