The binary serializer uses serializer.serialize_tuple() and serialize_element() which, in some formats at least, makes it data-dependent. E.g. MessagePack prepends every element greater than 127 with 0xCC.
Also, this contradicts the documentation claim:
When using a binary format, the data is serialized as-is into binary.
What was the reason behind not using serialize_bytes()? Seems like it would provide better constant-time guarantees?
The binary serializer uses
serializer.serialize_tuple()andserialize_element()which, in some formats at least, makes it data-dependent. E.g. MessagePack prepends every element greater than 127 with0xCC.Also, this contradicts the documentation claim:
What was the reason behind not using
serialize_bytes()? Seems like it would provide better constant-time guarantees?