3 ms·
Cap'n'proto and ASN.1 require a schema. Gzip compression means the content has to be decrypted into json and then parsed into a native representation, which pr
by thayne 7y ago
Cap'n'proto and ASN.1 require a schema. Gzip compression means the content has to be decrypted into json and then parsed into a native representation, which probably requires more memory and cpu than cbor deserialization.
- edoceo 7y agoNot decrypted. Decoded or decompressed.
- thayne 7y agoOops, I meant decompressed.
- Matthias247 7y agoThat’s right. In addition: CBOR can’t automatically compress field names, since those are strings which need to get fully serialized. gzip can compress them too, so it has a chance to trim the size of data further down in exchange for the additional cost of a 2nd encoding. Cap‘N‘Proto, protobuf and co can replace field names by IDs as indicated through Schemas and will thereby most space efficient in general.
- userbinator 7y agoTechnically, you can use ASN.1 in a "schemaless" mode, but it's not very common.