Results 1 to 4 of 4
I've been searching for ever for a linux fs that will give me on-the-fly compression like ntfs. The closest thing I have found, that is stable, is squashfs. But recently ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-24-2003 #1Just Joined!
- Join Date
- Feb 2003
- Posts
- 37
On-The-Fly File Compression
I've been searching for ever for a linux fs that will give me on-the-fly compression like ntfs. The closest thing I have found, that is stable, is squashfs. But recently a thought occured to me. (can you believe it, I actually have thoughts ;)
Is it possible to compress a folder using gzip and then mount the new file in some way so that it could be used for on-the-fly (de)compression? Stretch your mind, open your thoughts... could it be possible at all?
- 02-24-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
I'm sure that you could modify the loop device kernel driver to include on-the-fly decompression, and maybe even implement a "tarfs". All that would of course be best to do on the Hurd, but since this is Linux, that won't be possible.
The greatest problem, however, is that gzip isn't seekable, and even less modifyable. I don't know if you've read about LZW compression, but it makes it completely impossible to change the contents of a gzipped file wihtout rebuilding the entire archive (or really just the parts after the one you changed, but it's just marginally better).
Therefore, it would be much better if you'd find a modifyable compression algorithm, like a block based one or something (I don't really know that much about compression).
- 02-25-2003 #3Just Joined!
- Join Date
- Feb 2003
- Posts
- 37
AVFS You Respond
Thanks Dolda, there are really no words to express how much your comment has helped me and other linux users.
Anyway, I think I may have found something like what I've been looking for. It's called AVFS. If anyone has ever used this, please write in.
- 03-03-2006 #4Just Joined!
- Join Date
- Mar 2006
- Posts
- 1
linux transparent filesystem compression
I hope these links help:
http://zlibc.linux.lu/
<excerpt>
Introduction
Zlibc is a read-only compressed file-system emulation. It allows executables to uncompress their data files on the fly. No kernel patch, no re-compilation of the executables and the libraries is needed. Using gzip -9, a compression ratio of 1:3 can easily be achieved! (See examples below). This program has (almost) the same effect as a (read-only) compressed file system.
How it works:
This package overrides the "open" function (and other similar system call functions) of the C library. this package uses the LD_PRELOAD variable to redirect the dynamic linker to use the relevant functions of uncompress.o instead of the shared library. The behavior of the tools may be tuned using the /etc/zlibc.conf configurator file.
</excerpt>
http://zlibc.linux.lu/faq.html
<excerpt>
Can I also compress executables?
Zlibc cannot use compressed executables. However there is another program, UPX which can do this. To save most disk space, use the two programs together. (zlibc is able to use compressed data files, but not executables, and UPX is able to use compressed executables, but not data files)
---<snip>---
How can I remove zlibc when I don't want it any more?
Buy a huge disk
Uncompress your compressed files with gunzip.
unset LD_PRELOAD, or remove it from /etc/ld.so.preload
</excerpt>


Reply With Quote
