I was speaking with someone recently who brought up the idea of changing the storage format from JSON to a binary format to save space. I believe we have discussed this in the past and decided it wasn't worth doing, but I would like to confirm the consensus viewpoint the issue before writing a wiki article on it.
I think the biggest objection was that encoding and decoding are non-trivial tasks:
- Client applications would have to handle encoding and decoding, if your language of choice doesn't have a port of MessagePack (or whatever format) you have to write one yourself.
- It would break generic searches of record values using the blockchain database. I do not believe Namecoin nor Libcoin utilizes this feature at the moment, but I certainly would not want to loose that capability.
- It makes debugging more of a headache. The reason Unix stores config files in plain text is because prior systems required binary decoders to manipulate anything and it was a royal PITA. As the Unix saying goes, text is THE universal interface.
- Clients with limited space should implement thin-client solutions. The savings from binary storage are a joke compared to SPV, UTXO, SCIP and friends.
- Compression can be applied transparently at different layers of abstraction, such as within the database, at the file-system level, and over the wire.
- Binary compression of records cannot utilize commonalities across records. For example, a domains registered via a registrar should simply reference a generic record for that registrar (which also simply references a nameserver). It's trivial for a DB or filesystem to compress this information and it should yield savings within an order of magnitude of what one would achieve using binary compression