Using a protobuf or other IPFS-ish format for the wrapping archive #6
Description
In ipfs/kubo#1195, @jbenet proposed making the archive file itself a DAG object (or maybe just a protobuf or something ;). I'm not entirely clear on what he has in mind.
Looking over the protobuf encoding, I think it's a poor choice for the index, because efficient bisection requires fixed-size records, and protobuf encoding works hard to not use fixed-size fields. Jumping to the n-th record is slow if you have to read all n-1 records to figure out how long they are. We'll have the same problem if we try to put something like Git's fanout index in a protobuf. On the other hand, I don't have a problem with putting a fanout table, index, and array of serialized objects into a wrapping protobuf. But I don't see that gaining a lot of efficiency, either in programming time or processing efficiency, with such a small portion of the file syntax being handled by protobufs.
So I'm currently leaning against this, but I admit to not understanding the vision ;). If anyone wants to clear me up on this front, I'd be happy for the enlightenment.