Ext2 compression extension 0.4.45 reviewDownload
E2compr is a small patch against the ext2 filesystem that allows on-the-fly compression and decompression
E2compr is a small patch against the ext2 filesystem that allows on-the-fly compression and decompression. It compresses only regular files; the administrative data (superblock, inodes, directory files etc.) are not compressed (mainly for safety reasons).
Access to compressed blocks is provided for read and write operations. The compression algorithm and cluster size (see section Clusters) is specified on a per-file basis. Directories can also be marked for compression, in which case every newly created file in the directory will be automatically compressed with the same cluster size and the same algorithm that was specified for the directory.
E2compr is not a new filesystem. It is only a patch to the ext2 filesystem made to support the EXT2_COMPR_FL flag. It does not require you to make a new partition, and will continue to read or write existing ext2 filesystems. You should consider it is only a way for the read and write routines to access files that could have been created by a simple utility similar to gzip or compress. Compressed and uncompressed files will coexist nicely on your ext2 partitions.
Basically, a file is compressed with the command `chattr +c filename', and decompressed with the command `chattr -c filename'. You can also do `chattr +c' (etc.) on a directory. The directory itself won't be compressed, but any new files created in that directory inherit that directory's compress flag and compression algorithm and cluster size.(1)
Use lsattr to see if a file should be compressed or not, and to see what compression algorithm and cluster size will be used.
Use e2ratio to see how much disk space is used by the compressed form compared to the uncompressed form.
You can also try the `-u' or `-r' options to lsattr. (The difference is that, for directories, e2ratio finds the disk usage of the whole directory tree, like du, whereas `lsattr -u' only shows the space taken by the directory file, like `ls -s'.)
Ext2 compression extension 0.4.45 search tags