current code reads mantissa as ..00 0110 0100 0010 0010 (first two bits are always 0)
Made following changes:
Mantissa is using 2 least significant bits from first byte, so it needs to be AND-ed with 3 (0000 0011 instead of 4 0000 0100) - fixed this both ways
Also added a roundtrip unit test - pretty much copied and adjusted the one above it.
The unit test showed another issue - when serialising REMB, the exponent and mantissa need to be OR-ed (instead of AND-ed) for the shared byte - otherwise that byte would always be 0, so fixed that as well
I've found a bug in REMB packet serialisation.
For reference, here's the layout:
Based on sample Wireshark dissect:
current code reads mantissa as
..00 0110 0100 0010 0010
(first two bits are always 0)Made following changes:
0000 0011
instead of 40000 0100
) - fixed this both ways