Use zopfli for cpan distribution

作者:   發佈於:  

zopfli is a compression algorithm and program with very good compression ratio, and it produces gzip-compatible output. It is very suitable for software tarball distribution.

perlbrew has these paragraph in Makefile.PL:

makemaker_args(
    dist => {
        COMPRESS => "zopfli -i50",
    }
);

That's applicable for Module::Install . For EUMM-based code, that should be:

WriteMakefile(
    # ...other options...
    dist => {
        COMPRESS => "zopfli -i50"
    }
);

It is significantly slower to run zoipfli -i50 comparing to gzip -9, but the different is also significant. I chose 50 from some random trail. 50 is at some sweet spot that it still takes reasonably short amount of time, and always have pretty decent size improvements.