-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC4224: CBOR Serialization #4224
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also sign off on your changes so we can eventually put this on a track to acceptance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation requirements:
- Client
- Server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a very small stepping stone in the right direction, I think this MSC does a good job. I would say that the lack of enum integer keys makes this kinda useless to do, as the gain is so small. However, the un-base64ing of binary values results in quite a significant improvement for encrypted messages, and that does make enough of a difference imo to encourage servers to support this MSC.
## Potential issues | ||
|
||
At the time of writing, this proposal doesn't provide a integer mapping for | ||
string keys and static string values, which leaves out encoding efficiency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is really going to hurt the numbers on this, as short messages are overwhelmingly made up by key names.
at the time of writing is too complex to implement and have not yet been | ||
accepted into the spec, this proposal focuses on CBOR serialization part of it. | ||
|
||
## Proposal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have some example messages to compare JSON vs proposed CBOR sizes and the % reduction. This proposal would have a large benefit on encrypted rooms due to the base64 ciphertexts being un-base64'd. It would have a very small effect on unencrypted data, due to the prolific use of strings as values which don't see any compression benefits.
Rendered
Yes, this is basically #3079 but only CBOR part of it, "one bite at a time" and such.
This MSC is written as an individual FOSS contributor. (Disclosure as by matrix-org/matrix-spec#1700)
Signed-off-by: Alexander Ivanov [email protected]