zRecompress (English) 
Sunday, April 06 2014 . 09:29 AM
Introduction
zRecompress is a deflate and LZMA recompressor, that currently supports GZ and SWF file formats.

Among GZ, almost all derivatives such as GZ, TGZ and SVGZ should be supported.

It is usually able to reduce the size, because it brute forces the recompression in order to find optimal ettings. Additionally the builtin deflate engine comes from 7-Zip (Igor Pavlov), and is more efficient than usual one such as Zlib. All recompression is performed in memory, so overhead is reduced to the minimum, except for CPU load.

For GZ files, metadata is trimmed to the minimum mandatory, allowing it to squeeze a few additional bytes.

You can chain it with other deflate recompressors, for GZ, the optimum is normally advdef (Andrea Mazzoleni), zRecompress and DeflOpt (Ben Jos Walbeehm). For SWF, it is flasm (Igor Kogan), and then zRecompress.




Usage
zRecompress.exe <-tswf|-tswf-deflate|-t-swf-lzma|-tgz> <File>

Commands:
-tswf: Recompress <File> as a SWF, keeping original compression scheme.
Best compatibility.
-tswf-deflate: Recompress <File> as a SWF, using always deflate compression
scheme.
-tswf-lzma: Recompress <File> as a SWF, using always LZMA compression scheme.

Best compression ratio
File: File does not support wildcards, but paths does. Quote it if
containing spaces.

Examples:
zRecompress.exe -tswf-lzma Movie.swf


Technical details
zRecompress uses the LZMA SDK for compressing and decompressing LZMA files, and the 7-Zip modified source that comes in AdvanceCOMP for deflate. Deflating is an old implementation from 2003, based on an old 7-Zip source based on version 3 circa 2003. I am not able to upgrade it, so it will not be changed until LZMA SDK comes with deflate support. Inflates are always done by ZLib for compatibility and easy to use reasons.

Brute force relies on the number of passes for deflate, and lc, lp and pb

Even if it is currently not used, there is also a brutefoce deflate implementation using Zlib, and trying different strategies.

Program can be enhanced adding support for other deflated files like ZIP, PNG, APNG, MNG, PDF, ...


Sponsors



Download
- Win32 and Win64 binaries (217 Kb. in ZIP format).
- Visual C++ 2013 source code (527 Kb. in ZIP format).


History
2.12 - 2013/11/04
- Upgraded to Visual C++ 2013.

2.11 - 2012/11/30
- Upgraded to Visual C++ 2012 Update 1, which should make it compatible with Windows XP or later.

2.10 - 2012/08/20
- Improved deflate compression ration by increasing passes to 255.
- More detailed progress information (maadjordan).
- Minor internal optimizations.

2.00 - 2012/08/19
- Switched from Zlib deflate with 7-Zip for enhanced compression ratio.
- Added LZMA brute force.
- x86 and x64 builds.
- Implemented -tswf-lzma and -tswf-deflate commands.
- Added support for raw files that will be GZipped if -tgz is used.

1.50 - 2012/08/11
- Added SWF support (uncompressed, deflate and LZMA).
- Included match.asm by Konstantin Nosov in Zlib in order to slightly improve compression ratio, and greatly improve compression speed.

1.10 - 2012/07/08
- Tuned Zlib deflate settings for slightly better compression.

1.00 - 2012/07/04
- Initial public version


Links
- Official zRecompress's website: nikkhokkho.sourceforge.net/static.php?page=zRecompress.

- Official author's website: www.javiergutierrezchamorro.com.