Git Product home page Git Product logo

fuse-archive's Introduction

Fuse-Archive

fuse-archive is a program that serves an archive or compressed file (e.g. foo.tar, foo.tar.gz, foo.xz or foo.zip) as a read-only FUSE file system.

It is similar to mount-zip and fuse-zip but speaks a larger range of archive or compressed file formats.

It is similar to archivemount but can be much faster (see the Performance section below) although it can only mount read-only, not read-write.

Build

$ git clone https://github.com/google/fuse-archive.git
$ cd fuse-archive
$ make

On a Debian system, you may first need to install some dependencies:

$ sudo apt install libarchive-dev libfuse-dev

Performance

Create a single .tar.gz file that is 256 MiB decompressed and 255 KiB compressed (the file just contains repeated 0x00 NUL bytes):

$ truncate --size=256M zeroes
$ tar cfz zeroes-256mib.tar.gz zeroes

Create a mnt directory:

$ mkdir mnt

fuse-archive timings:

$ time fuse-archive zeroes-256mib.tar.gz mnt
real    0m0.443s

$ dd if=mnt/zeroes of=/dev/null status=progress
524288+0 records in
524288+0 records out
268435456 bytes (268 MB, 256 MiB) copied, 0.836048 s, 321 MB/s

$ fusermount -u mnt

archivemount timings:

$ time archivemount zeroes-256mib.tar.gz mnt
real    0m0.581s

$ dd if=mnt/zeroes of=/dev/null status=progress
268288512 bytes (268 MB, 256 MiB) copied, 569 s, 471 kB/s
524288+0 records in
524288+0 records out
268435456 bytes (268 MB, 256 MiB) copied, 570.146 s, 471 kB/s

$ fusermount -u mnt

Here, fuse-archive takes about the same time to scan the archive, bind the mountpoint and daemonize, but it is ~700ร— faster (0.83s vs 570s) to copy out the decompressed contents. This is because fuse-archive does not use archivemount's quadratic complexity algorithm.

Disclaimer

This is not an official Google product. It is just code that happens to be owned by Google.


Updated on May 2022.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.