You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing an array of bytes Transit uses the BinaryWriteHandler which gives the b tag. Then for that tag, the AbstractEmitter calls the function emitBinary. Its implementation in MsgpackEmitter encodes the array of bytes as Base64 and emits an string as follows:
Reading the specs of MessagePack I see that they have native support for encoding binary data without having to use strings encoded as Base64. I can understand this strategy for the JSON emitters but not for the Msgpack one.
The text was updated successfully, but these errors were encountered:
I just realised that the Transit specs mandate to encode binary data as a base64 string. I don't really understand this decision, and makes me realise that using the MSGPACK format is not that much better than using the JSON one.
When writing an array of bytes Transit uses the
BinaryWriteHandler
which gives theb
tag. Then for that tag, theAbstractEmitter
calls the functionemitBinary
. Its implementation inMsgpackEmitter
encodes the array of bytes as Base64 and emits an string as follows:Reading the specs of MessagePack I see that they have native support for encoding binary data without having to use strings encoded as Base64. I can understand this strategy for the JSON emitters but not for the Msgpack one.
The text was updated successfully, but these errors were encountered: