Oddbean new post about | logout
 Event IDs, pubkeys and sigs are such high entropy data that gzip probably won't compress them much. Also binary formats are faster to decode than json (+ gzip). 
 Gzip can however compress the text content of notes whether binary or json 
 gzip saves space over the wire, but you still have to parse all the bytes. There are ways to reduce this (https://github.com/WebReflection/json.hpack/wiki) as well as organize your schema to be stream-parseable, but it will never be as fast as a binary format. The thing is, HTTP already supports "Accept" and "Content-Type", and there's no reason relays and clients couldn't negotiate a different serialization format.