1

I would like to be able to combine several files into one file and be able access the inner files without having to do any sort of unpacking. Something like the universal binary for Mac.

Does such a file format exist?

Edit
Some further research helped me clarify what I want: a single-file filesystem. At this point the only option seems to be a mounted ISO file. However, better suggestions are always welcome.

1
  • 1
    On mac this is actually called a bundle, universal binary is something different.
    – cobbal
    Dec 11, 2009 at 21:08

4 Answers 4

5

Unpacking/decompressing the archive explicitly is not strictly necessary. You want a FUSE (Filesystem in User Space) that allows you to mount archive files.

Any necessary unpacking/repacking is done in the filesystem, so it's transparent to the programs you'd use to access or modify files inside a mounted archive.

One such project is archivemount (Wikipedia link, source tarballs). It and various other projects are listed on Sourceforge's wiki ArchiveFileSystems page. Different projects use different libraries as backends to do the actual work.

Some projects only seem to support read operations, but many are young and may include write features at a later date.

  • archivemount uses libarchive, accesses cpio, .tar.gz, .tar.bz2 archives
  • fuse-zip uses libzip, includes write-support for .zip archives
  • avfs (A Virtual FileSystem) "supports floppies, tar and gzip files, zip, bzip2, ar and rar files, ftp sessions, http, webdav, rsh/rcp, ssh/scp" and others.

Ideally, a FUSE filesystem for archives will work a bit like the Windows Explorer's support for browsing .zip files.

4

Your best bet is to look at zero-compression compressed formats. Here's an example using the command-line 7zip in Linux for that purpose (though this probably isn't installed by default)

7z a -mx0 archive folder

For more answers, take a look at this similar question that was posted on stackoverflow:

https://stackoverflow.com/questions/79136/how-do-i-create-a-container-file

1
  • Accessing the files still requires an unpacking of the archive. Which is what I want to avoid. Dec 12, 2009 at 3:21
4

you can use loop device: http://en.wikipedia.org/wiki/Loop_device. How to: http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/ (kudos for Zoredache from serverfault)

0

You could have a look at how klik does it : http://klik.atekon.de/wiki/index.php/Main_Page It's very similar to the dmg for Mac, and it uses FUSE.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .