Fixing varint and decimal encoding/decoding