Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
/img/help/home.gif /img/help/prev.gif /img/help/next.gif

 

Tuning ECL

 


 

Users of ECL Pro or other editions supplied with the source code could configure footprint, encryption using compiler directives. Now you can tune compression algorithms on any edition by setting new values for tuning variables.

 

Tuning footprint

By default ECL contains three compression and one encryption algorithms.

Overall footprint is about 100Kb. But if you need only one compression algorithm and don't need encryption capabilities you may reduce footprint to 40Kb.

  • To switch off encryption, remove {$DEFINE ENCRYPTION} compiler directive in EasyCompression unit.
  • To switch off ZLib compression, remove {$DEFINE ZLIB} compiler directive in EasyCompression unit.
  • To switch off BZIP compression, remove {$DEFINE BZIP} compiler directive in EasyCompression unit.
  • To switch off PPMD compression, remove {$DEFINE PPMD} compiler directive in EasyCompression unit.
  •  

    Configuring encryption algorithm

    Set {$DEFINE HASH_128} compiler directive in ECLCipher unit to get 128-bit key encryption or remove the directive to use 256-bit key.

     

    Tuning compression algorithms

    There are several variables in EasyCompression unit that could be used to configure compression algorithms. Default values are optimized for high compression rate on large files (> 100 Kb). If you need to compress small files try to decrease buffer size values, if you need to achieve higher compression rate increase them.

     

    // fastest levels for all algorithms

    BlockSizeForFastest: Integer = 512 * 1024; // 0.5 MB for fastest modes

     

    // normal levels for all algorithms

    BlockSizeForNormal: Integer = 1024 * 1024; // 1.0 MB for normal modes

     

    // maximum level for all algorithms

    BlockSizeForMax: Integer = 1536 * 1024; // 1.5 MB for max modes

     

     

    We recommend to test all new settings for PPM on many different files for compressing and decompressing. If decompression errors will occurs try to increase buffer size or decrease model order. More model order value provides slower compression and higher compression rate.

    // fastest level for PPM

    PPM_FASTEST_MO: Integer = 3; // PPM model order (2 - 16)

    PPM_FASTEST_SA: Integer = 10; // PPM buffer size, MB

     

    // normal level for PPM

    PPM_NORMAL_MO: Integer = 5;

    PPM_NORMAL_SA: Integer = 25; // MB

     

    // maximum level for PPM

    PPM_MAX_MO: Integer = 13;

    PPM_MAX_SA: Integer = 50; // MB

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 21, 2024