mirror of
https://github.com/schnaader/precomp-cpp
synced 2026-08-23 00:23:04 -04:00
Speed up recommendations with -t- options
This commit is contained in:
parent
1a8cbd3eb3
commit
d596c0f603
1 changed files with 28 additions and 0 deletions
28
precomp.cpp
28
precomp.cpp
|
|
@ -3372,6 +3372,34 @@ void show_used_levels() {
|
|||
}
|
||||
}
|
||||
|
||||
string disable_methods(""); // for comfort it will be reverse
|
||||
/*
|
||||
P = PDF, Z = ZIP, G = GZip, N = PNG, F = GIF, J = JPG
|
||||
S = SWF, M = MIME Base64, B = bZip2, 3 = MP3
|
||||
*/
|
||||
#ifdef COMFORT
|
||||
#define DISABLE_OR_ENABLE_FOR_COMFORT !
|
||||
#else
|
||||
#define DISABLE_OR_ENABLE_FOR_COMFORT
|
||||
#endif // COMFORT
|
||||
if (((use_pdf) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_pdf_count == 0) || (decompressed_pdf_count == 0)))) disable_methods += 'P';
|
||||
if (((use_zip) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_zip_count == 0) && (decompressed_zip_count == 0)))) disable_methods += 'Z';
|
||||
if (((use_gzip) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_gzip_count == 0) && (decompressed_gzip_count == 0)))) disable_methods += 'G';
|
||||
if ((((use_png) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_png_count == 0) && (decompressed_png_count == 0))) && ((recompressed_png_multi_count == 0) && (decompressed_png_multi_count == 0)) )) disable_methods += 'N';
|
||||
if (((use_gif) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_gif_count == 0) && (decompressed_gif_count == 0)))) disable_methods += 'G';
|
||||
if (((use_jpg) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_jpg_count == 0) && (decompressed_jpg_count == 0)))) disable_methods += 'J';
|
||||
if (((use_jpg) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_jpg_prog_count == 0) && (decompressed_jpg_prog_count == 0)))) disable_methods += 'P';
|
||||
if (((use_mp3) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_mp3_count == 0) && (decompressed_mp3_count == 0)))) disable_methods += '3';
|
||||
if (((use_swf) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_swf_count == 0) && (decompressed_swf_count == 0)))) disable_methods += 'S';
|
||||
if (((use_base64) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_base64_count == 0) && (decompressed_base64_count == 0)))) disable_methods += 'M';
|
||||
if (((use_bzip2) && DISABLE_OR_ENABLE_FOR_COMFORT((recompressed_bzip2_count == 0) && (decompressed_bzip2_count == 0)))) disable_methods += 'B';
|
||||
if ( disable_methods.length() > 0 ) {
|
||||
if (DISABLE_OR_ENABLE_FOR_COMFORT(false))
|
||||
printf("\nCompression_Types=%s",disable_methods.c_str());
|
||||
else
|
||||
printf(" -t-%s",disable_methods.c_str());
|
||||
}
|
||||
|
||||
if (max_recursion_depth_reached) {
|
||||
printf("\n\nMaximal recursion depth %i reached, increasing it could give better results.\n", max_recursion_depth);
|
||||
} else if (max_recursion_depth_used != max_recursion_depth) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue