Live data from Hacker News

Mounting tar archives as a filesystem in WebAssembly

jeroen.github.io

41–42 of 42 posts

Re: Mounting tar archives as a filesystem in WebAssembly

#41

Earlier quoted context omitted.

But then you are not using tar, you are doing your own file format atop of tar.

I suppose you are right about that. But it would still be a valid tar file that can be viewed and extracted with normal tools. Kind of similar to how a .docx file can be extracted as zip but still has additional structure to its contents.

What are you really proposing? That a first ".INDEX" entry be made that contains the offsets of all the other members?

That could work in a backwards-compatible way (as long as no standard tar utility makes modifications to the archive...), but it's hamfisted. Just use Zip. It's already a well-known format with numerous implementations and already does the job that you want to do.

Re: Mounting tar archives as a filesystem in WebAssembly

#42

Only peripherally relevant, but also see Ratarmount: https://github.com/mxmlnkn/ratarmount It lets you mount .tar files as a read only filesystem. It’s cool because you basically get random access to the tarball without paying any decompression costs. (It builds an index saying exactly where so-and-so is for every file.)

Ratarmount is so cool. Recently I wanted to look at a couple random files in a > 300G compressed tarball. It just wouldn't have been worth doing without it.
Post reply on HN