Oddbean new post about | logout
 I believe we'll always have JSON for simplicity and backward compatibility. Simplicity is indeed important, it's why Nostr attracted developers. I don't think opt-in binary format supported by some clients and relays can break that. We already have many nips not supported by everyone. 
 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. 
 Test & troubleshoot in JSON, operate in production in binary (: