ZLIBC

Zlibc is a read-only compressed filesystem emulation. It allows executables to uncompress their datafiles on the fly. No kernel patch, no recompilation 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 to install it:

To install zlibc, unpack it using tar xfzvvp zlibc-0.9h.src.tar.gz, and then execute the following commands:

$ ./configure
$ make
$ make install
Then point your LD_PRELOAD variable to /lib/uncompress.o (on Linux) or to /usr/local/lib/uncompress.o on SunOs or Solaris.


$ echo 'This is a test' >testfile
$ gzip testfile
$ cat testfile
cat: testfile: No such file or directory
$ LD_PRELOAD=/lib/uncompress.o
$ export LD_PRELOAD
$ cat testfile
This is a test
See the included documentation for further instructions. This documentation is supplied as a texinfo file. To print it out, do

$ make dvi
$ dvips zlibc.dvi
To generate an info documentation, do

$ make info
You can then browse this documentation using Emac's info mode, or using a standalone info browser. You can also generate html, and browse it using your favorite Web browser:

$ make html

New in release 0.9:

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.

Examples: (compressed with gzip -9)

Before After
/usr/info/ 1568KB 512KB
/usr/lib/emacs/19.19 6750KB 2550KB
/usr/local/smalltalk 326KB 126KB
/usr/local/lib/lisp 2256KB 779KB
/usr/lib/*.a 1094KB 476KB
/usr/X386/lib/*.a 1110KB 470KB
/usr/include 655KB325KB
/usr/lib/X11/fonts/75dpi/ 3158KB (1531KB compressed) 1095KB (gzipped)
/usr/lib/X11/fonts/Speedo/ 530KB (479 compressed) 373 (gzipped)
/usr/lib/X11/fonts/misc/ 892k (323KB compressed) 254KB (gzipped)
/usr/TeX/macros/ 1167KB 223KB (sic!)
/usr/TeX/inputs 242KB 74KB
/usr/TeX/formats 779KB 251KB

Available files:


There is an zlibc mailing list at zlibc @ www.tux.org . Please send all bug reports to this list. You may subscribe to the list by sending a message with 'subscribe zlibc @ tux.org' in its body to majordomo @ tux.org. (N.B. Please remove the spaces around the "@". I left them there in order to fool spambots.) Announcements of new zlibc versions will also be sent to the list, in addition to the linux announce newsgroups. There also exists an archive of the mailing list. The manual for zlibc-0.9g is available here


To contact me, mail me at Alain.Knaff at poboxes.com .
Last modified: Sun Mar 22 17:10:32 MET 1998