Different compression levels

Discuss about the plans: what features to add, how to develop, ...

Moderator: feffer

Posts: 2
Joined: Fri Mar 23, 2007 10:20 am

Different compression levels

Postby jmeile » Fri Mar 23, 2007 10:37 am

It would be nice to support different compression levels for bzip2/gzip. I just found that the gzip images are much bigger than the ones generated by symantec Ghost. I could use bzip2 to compress them, but there is a known bug that doesn't allows you to restore the mbr from such type of image. (Yes, I know you can also manually store the mbr and partition table, but this would be a nice to have).

In order to cope with that bug, one could use the best compression level from gzip --best or 9. I saw the code, and this wouldn't be difficult to change:

This lines:

m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");

Could be replaced by

m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wbx"); //"wb1h");
m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rbx");

Where "x" is a digit between 1 and 9. So, a compression paramater like --gzx could be used to pass the level compression.

I think something similar could be done for bzip.


Posts: 3
Joined: Mon Apr 09, 2007 9:24 am

Postby hr » Mon Apr 09, 2007 10:01 am

has a patched version of partimage that supports lzo compression,
much faster at decompression than gzip, and only slightly less efficient at compression than gzip.
I wonder if this will be included in the next official partimage release


Posts: 2
Joined: Fri Mar 23, 2007 10:20 am


Postby jmeile » Mon Apr 09, 2007 10:32 am

I also watched at clonezilla and it looks nice; however, it only supports one compression level for lzo, which I guess it is the default --fast or -1 swicht. As you, I agree that it would be nice to include it to the partimage source. It would be nice as well to include other levels: ie: -lzo1, -lzo3, and -lzo9

The same could apply for gzip and bzip:
-gz1, -gz3, and -gz9
-bz1, -bz3, and -bz9

To keep backwards compatibility, one could keep the -zx switches as they are.

Return to “Future”

Who is online

Users browsing this forum: No registered users and 1 guest