Git Product home page Git Product logo

archivefs's Introduction

archivefs

archivefs - mount your archives and browse them as regular files

Usage

archivefs [-sdf] --directory=/some/absolute/path /mountpoint

Features

  • Expand archives as directories
  • Reads files from an archive as a regular file
  • Shows non-archive files and directories as normal

Quick example

$ tree .
.
├── archives
│   └── maskinen.tar.gz
└── mountpoint

2 directories, 1 file
$ archivefs --directory=$HOME/example/archives mountpoint/
$ tree .
.
├── archives
│   └── maskinen.tar.gz
└── mountpoint
    └── maskinen
        ├── pengar.txt
        └── segertaget.txt

3 directories, 3 files
$ cat mountpoint/maskinen/segertaget.txt | head -n5
[Vers 1]
He-he-hej, här kommer segertåget
Rullar in som teknodromen
Tryck på play, du sätter på den
Dansar som på, äh, vi kör igen

Description

archivefs is a FUSE file system for mounting and reading from archive files instead of unpacking them to read the content.

Building

To build archivefs there are some packages that are required to be installed on the system:

To build the project you run the make command:

$ brew bundle # Installs dependencies for building the project
$ make

Bugs

archivefs does not handle nested directories inside an archive file properly. For now only flat archvies are compatiable.

If you get the following error message you can try setting the LD_LIBRARY_PATH environment variable to the path of the libarchivefs library:

$ ./archivefs
./archivefs: error while loading shared libraries: libarchivefs.so: cannot open shared object file: No such file or directory
$ LD_LIBRARY_PATH=./target/release/deps ./archivefs
Need to set which archive you want to mount

Good links

archivefs's People

Contributors

bzf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

archivefs's Issues

Could this program run in a Docker container?

It seems like a cool idea to have the full fuse and libarchive dependencies inside a Docker container which could be downloaded an manage the streaming part (and maybe it will be easier to have Docker as a dependency than install Fuse?).

  • Can you mount a fuse filesystem on a mounted directory through Docker?
  • Will it be fast enough?

I'm imagining running a command simliar to

$ docker run --rm -v /where/my/archives/live:/archives -v ./mountpoint:/mountpoint archivefs

which, on start, would scan for archives in /archives and mount the filesystem in /mountpoint.

How to test for memory leaks

Could we run valgrind in a Github Action and read some files from an archive and see if something got leaked?

Browse non-archives as regular files

Only replace archives with a folder and browse other files as regular files.

Before:

$ tree mounted/
mounted
├── files.rar
└── foo.txt

0 directories, 2 files

After:

$ tree mounted/
mounted
├── files
│   └── debian-9.0.0-amd64-netinst.iso
└── foo.txt

1 directory, 3 files

Memory leak when reading from archived files

image

When running the app as a way of exposing files as a Samba share in Proxmox, it seems to leak memory while reading from archived data. I'm not sure if it does that for regular files as well.

I just recently moved my Samba shares to run in a Proxmox container, so it hasn't been live for that long, but the graph shows a telling story never the less.

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.