FuseCompress (compressed filesystem)
	http://www.miio.net/fusecompress

We are not responsible for any badness that may happen to you during using
this software.

License:

This program is distributed under GNU/GPL version 2 

Todo:

	- 7zip compression module

Requires:

	librlog >= 1.3 (RLog - a C++ logging library)

Usage:

	fusecompress [OPTIONS] /storage/directory/

		-h			print this help
		-c lzo/bz2/gz/none	choose default compression method
		-b size			block size in kilobytes
		-o ...			pass arguments to fuse library

	You can mount filesystem over existing directory with files.
	However, these files will not be compressed when
	you work with filesystem. Only new files will be
	compressed. If you want to compress files that are uncompressed,
	use fusecompress_offline or fusecompress_offline.sh.

Example:
	Storage directory is /tmp/fc in all following examples.
	
	o Mount directory

		fusecompress /tmp/fc

	o Unmount directory

		fusermount -u /tmp/fc
	
	o Compress file to the format fusecompress uses

		fusecompress_offline -c gz /tmp/fc/test.dat /tmp/fc/test.dat.tmp
		mv /tmp/fc/test.dat.tmp /tmp/fc/test.dat
	
	o Decompress file

		fusecompress_offline /tmp/fc/test.dat /tmp/fc/test.dat.tmp
		mv /tmp/fc/test.dat.tmp /tmp/fc/test.dat

	o Compress all files in the directory

		fusecompress_offline.sh gz /tmp/fc
	
	o Decompress all files in the directory
	
		fusecompress_offline.sh /tmp/fc
	
Useful parameters for fuse library:

	Fuse library must be configured to support this
	features - configuration file /etc/fuse.conf must contains
	at least this option: user_allow_other.

	allow_other
	
		This option overrides the security measure restricting
		file access to the user mounting the filesystem.
		So all users (including root) can access the files.
		This option is by default only allowed to root, but
		this restriction can be removed with a configuration
		option described in the previous section.
	
	allow_root
	
		This option is similar to 'allow_other' but file access
		is limited to the user mounting the filesystem and root.
		This option and 'allow_other' are mutually exclusive.

Tips and tricks:

	How to obtain compression ratio?

	o	Run this command in the FuseCompress(ed) directory when mounted
		with FuseCompress:
			du -sh
			du -sh --apparent-size
		First command prints total uncompressed size of all files
		in the current directory and its subdirectories while
		second one prints total compressed size.

	o	When FuseCompress not running run `ls -l my_file.dat` and
		compare file size with value abtained with `file my_file.dat`.

File and magic utilities:

Put this config into ~/.magic or /etc/magic file to allow file utility
recognize FuseCompress file format:

0       string  \037\135\211    FuseCompress(ed) data
>3      byte    0x00    (none format)
>3      byte    0x01    (bz2 format)
>3      byte    0x02    (gz format)
>3      byte    0x03    (lzo format)
>3	byte	0x04	(xor format)
>3      byte    >0x04   (unknown format)
>4      long    x       uncompressed size: %d

Author:

Milan Svoboda <milan.svoboda@centrum.cz> (author and project maintainer)

Feel free to contact me with suggestions and bug reports.

