3 ms·
The Bao encoding supports two modes, combined and outboard. In the combined mode, the bytes of the tree are interleaved with the original file, producing an enc
by oconnor663 7y ago
The Bao encoding supports two modes, combined and outboard. In the combined mode, the bytes of the tree are interleaved with the original file, producing an encoded file that's about 6% larger. In the outboard mode, the bytes of the tree are stored separately in their own file.
Which mode to use depends on whether you need to keep the original, unencoded file around on the server. If the only thing the server needs to do is serve encoded bytes, the combined mode is more convenient. But if the server also wants to serve the original file (to clients who trust the server and don't need to verify any hashes), the outboard mode can avoid taking up double the storage space.
The idea in the outboard example is that the decoder is running somewhere else, not on the server, and it's streaming both the original file and the outboard encoding simultaneously.