Wrong compression level stored in archive

Post here if you found a bug or something really not expected in the program
Post Reply
Posts: 12
Joined: Sat Nov 28, 2009 8:02 pm

Wrong compression level stored in archive

Post by mbiebl » Sat Nov 28, 2009 8:15 pm

If I compile fsarchiver e.g. without lzma support, and then use a compression level >= 7, I get the following error message from fsarchiver:

# fsarchiver -z 9 savedir /tmp/foo /foo
fsarchiver.c#179,select_compress_options(): invalid compression level: 9

fsarchiver still seems to successfully create an archive though.
Looking at the resulting archive, I get:

# fsarchiver archinfo /tmp/foo.fsa
Compression level: 9 (gzip level 6)

Notice that the compression level is 9, yet it uses gzip level 6, which should be 3.

If a given compression level is not available, fsarchiver should either abort, or it should print a more helpful message like
"compression level: 9 not available (no lzma support), falling back to <foo>"
and fallback to a safe default.

The resulting archive should then also have the correct compression level stored

Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: Wrong compression level stored in archive

Post by admin » Sun Nov 29, 2009 11:14 am

Thanks for having reported that bug.
This problem has been fixed in fsarchiver-0.6.2_beta5.tar.gz and in the official svn repository.

BTW, xz-utils is a really good library, it's used by Fedora for RPM packages, so I think most users want to have lzma enabled.
The built-in support for lzma (with multithreding) is one of the best reasons to use fsarchiver.

Post Reply