Why not import/export tar archives to/from unixfs?

From @Stebalien on Mon Oct 05 2015 20:38:34 GMT+0000 (UTC)

Tar is just a portable read-only filesystem format so why does ipfs tar add/cat import into and export from a special tar dag instead of just using unixfs (also a portable read-only filesystem format)?


Copied from original issue: https://github.com/ipfs/faq/issues/59

From @jbenet on Mon Oct 05 2015 21:17:11 GMT+0000 (UTC)

Because that way you get really good dedup within tars. (and can even mount tars). it’s an example datastructure. this is pre-work towards car, an archive fmt we’re making

From @Stebalien on Mon Oct 05 2015 21:23:13 GMT+0000 (UTC)

Sorry, my question was unclear. Why not extract the tar into unixfs. That is, why write another merkeldag format for read-only filesystems when you already have one.

From @Stebalien on Mon Oct 05 2015 21:27:53 GMT+0000 (UTC)

Is this to work around the lack of metadata (permissions etc.) storage in unixfs?

From @jbenet on Mon Oct 05 2015 21:41:56 GMT+0000 (UTC)

> Is this to work around the lack of metadata (permissions etc.) storage in unixfs?

precisely-- it was a quick hack meanwhile we work on unixfs. but it ended up being pretty useful

it’s also useful to have native support for tars, so that in the future we can import regular unix filesystems and yet dedup tars and look into them. And still be able to reproduce the exact same fs on the way out.