Product PowerArc 1.3 from 30 Mar 2001
Description High efficient Data Compression Library for Delphi
Author Copyright (c) 1998-2001, SoftLab MIL-TEC Ltd
Web:   http://www.softcomplete.com
Email: support@softcomplete.com
Status Freeware (only BZIP engine)
Registration for PPM, RANK and ZIP engines $99.
Online registration is available.
Limitation work only in IDE


This is a legal Agreement between you (either an single individual or an entity, herein referred to as Licensee) and SoftLab (herein after referred to as Licensor). By installing this software (herein after referred to as Product), you indicate your acceptance of this Agreement.

SOFTLAB EVALUATION LICENSE AGREEMENT

  1.GRANT OF LICENSE.

    1.1 Licensor grants you a non-exclusive royalty-free license to make as many copies of the Product accompanying this agreement as you want, solely to test and to evaluate the Product before you make the decision to purchase the Product.

    1.2 You shall not use, copy, rent, lease, sell, modify, decompile, disassemble, otherwise reverse engineer, or transfer the Product except as provided in this Agreement. Any such unauthorized use shall result in immediate and automatic termination of this Agreement.

    1.3 You may transfer and distribute the Product in its unmodified form via electronic means to another persons so long as their use of the Product will be strictly for the purpose of evaluation.

    1.4 You are specifically prohibited from charging, or requesting donations for copies of the Product, distributing the Product with any other products without Licensors prior written permission.

  2. WARRANTY AND LIMITATION OF LIABILITY.

The Licensor hereby disclaims all warranties of any kind relating to the Product, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. The Licensee must assume the entire risk of using the Product.

PowerArc is the high efficient Data Compression Library for use with Delphi, C++ or VB. The library supports some algorithms of compression, both widespread, and specialized. All algorithms are contain built in data integrity check and thread-safe (can be work in multithread application). In the following table briefly we shall describe them.

Method
Description
Rank Some idea of this algorithm describe in article Peter Fenwick "Symbol Ranking Text Compression with Shannon Recodings". At small compression the very fast and effective implementation is possible.
ZIP standart pkware zip compression algorithm.
BZIP Modern algorithm of the compressions which have appeared rather recently. Is based on Burrows-Wheeler transform. Example of the archiver operating this algorithm is bzip2.
PPM The similar method was applied in the archiver HA (Harri Hirvola). Allows to reach a maximum degree of compression at the expense of a heavy expense of memory and lowering of speed of operation. Ideally approaches for compression of the text information.
More detail about this algorithm you can find in article Mark Nelson "Arithmetic Coding + Statistical Modeling = Data Compression" Dr. Dobb's Journal February, 1991

Each algorithm is realized as the separate DLL-unit and has the unitized interface:

const
  
PowerArcModuleSignature = 'AA6F3C60-37D7-11D4-B4BF-D80DBEC04C01';

type

  TPowerArcModuleInfo = packed record
    Signature:   PChar;   // must be eq to PowerArcModuleSignature
    Name:        PChar;   // module name
    Description: PChar;   // full module description
    Options:     PChar;   // options list delimited with #0
    DefaultBPC:  integer; // bit per char on calgary corpus *100
    MaxBPC:      integer;
    case integer of       // unique module ID
      0: ( ModuleID:  packed array[0..7] of Char );
      1: ( ModuleIDW: packed array[0..1] of integer );
  end;
  PPowerArcModuleInfo = ^TPowerArcModuleInfo;

  TReadFunc = function (Data: Pointer; var Buffer; Size: integer): integer; stdcall;
  TWriteFunc = function (Data: Pointer; const Buffer; Size: integer): integer; stdcall;

{ set default compression options }
procedure
SetOptions(Opt: PChar); stdcall;
{ compress stream }
procedure
Compress(Data: Pointer; Opt: PChar; ReadFunc: TReadFunc; WriteFunc: TWriteFunc); stdcall;
{ compress memory buffer }
procedure
CompressMem(Data: Pointer; Opt: PChar; Mem: Pointer; MemSize: integer; WriteFunc: TWriteFunc); stdcall;
{ decompress stream }
function
Decompress(Data: Pointer; ReadFunc: TReadFunc; WriteFunc: TWriteFunc): Boolean; stdcall;
{ get module information }
function
GetPowerArcModuleInfo: PPowerArcModuleInfo; stdcall;

On the following to a graphics the comparative outcomes of operation of different algorithms on Calgary Text Corpus are exhibited (click on image for more detail). These outcomes were obtained on slow computer with Pentium-166 CPU.

The same outcomes are indicated in the following table (cases of best compression and best speed are selected):

Rank ZIP BZIP PPM
Opt bits
char
MByte
sec
Opt bits
char
MByte
sec
Opt bits
char
MByte
sec
Opt bits
char
MByte
sec
1 3,818
1,337
1 3,027
0,507
1 2,301
0,187
2 2 2,560
0,301
2 3,780 1,271 2 2,914 0,464 2 2,211 0,187 3 3 2,148 0,250
3 3,635 1,292 3 2,817 0,371 3 2,171 0,183 4 4* 1,976 0,214
4* 3,523 1,246 4 2,716 0,345 4 2,134 0,180 6 5 1,921 0,181
5 3,394 1,218 5 2,637 0,252 5* 2,131 0,179 8 6 1,906 0,158
6 3,321 1,167 6* 2,600 0,179 6 2,119 0,177 16 7 1,902 0,131
7 3,266 1,020 7 2,592 0,155 7 2,105 0,178 32 8 1,900 0,121
8 3,263 0,909 8 2,583 0,121 8 2,090 0,175      
      9 2,581 0,093 9 2,090 0,175      
*) options by default

For compare with existing archiver note that PKWARE PKZIP 2.5 this file set compress with 2.6 bits per char.

The next table describing options for each algorithm

Method
Valid Options
Rank 1..8. set compression level
ZIP 1..9. set compression level
BZIP none
PPM M O, where M is the memory limith in Mbyte and O is the prediction order (delimited with space)

For more convenient operation you can use the stream interface (for more detail see PowerArc.pas)

type
  TPowerArcCompressStream = class(TStream)
  public
    constructor Create(BaseStream: TStream; FArcIdx: integer;
      const FArcOpt: string = '');
    destructor Destroy; override;
  end;

  TPowerArcDecompressStream = class(TStream)
  public
    constructor Create(BaseStream: TStream);
    destructor Destroy; override;
  end;


Copyright © 2001, SoftLab MIL-TEC Ltd