From: aminer on

Hello


Parallel Compression library version 1.2


Author: Amine Moulay Ramdane


Description:


Parallel Gzip , Parallel Zlib and Parallel Bzip algorithms that uses
my
Thread Pool Engine.


And please look at the test examples inside the zipfile:
test_pgzip.pas , pzlib.pas , test_pbzip.pas - compile and execute
them... -


And please see the benchmarks here:


http://pages.videotron.com/aminer/ParallelCompression/parallelbzip.htm

You can download my Parallel Compression library from:

http://pages.videotron.com/aminer/


The Parallel Compression library is VERY easy to use , and
here is an example in Object Pascal: - it's a parallel gzip
compression -


--------------------------

program test;


uses ParallelCompression,classes,zlibex,sysutils;

var
pgzip:TParallelGzip;
fstream1,fstream2,fstream3:TFileStream;
name:string;

begin

name:='msvcr100.dll'; // set your your test file ...

pgzip:=TParallelGzip.create(4); // number of cores...

fstream1:=TFileStream.create(name, fmOpenRead);//+fmShareExclusive);
fstream2:=TFileStream.create(name+'.gz',fmCreate);//
+fmShareExclusive); // destination of the compression...
fstream3:=TFileStream.create(name+'.ok', fmCreate);//
+fmShareExclusive); // destination decompression...


pgzip.compress(fstream1,fstream2,zclevel9); // select a
compressionlevel from
// zcNone or zcLevel1 to
zcLevel9


writeln;
writeln('Parallel compression finished...');

fstream2.position:=0;

pgzip.decompress(fstream2,fstream3);

writeln;
writeln('decompression finished...');


fstream1.free;
fstream2.free;
fstream3.free;
pgzip.free;

end.

-----------------------------------------------


Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/


Operating Systems: Win , Linux and Mac (x86).


Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal


-Sd for delphi mode....


Required Delphi switches: -DMSWINDOWS -$H+


For Delphi 5,6,7 use -DDelphi


For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+




Sincerely,
Amine Moulay Ramdane.

From: aminer on

Hello,


As you have noticed , my Parallel Compression library
works on TStreams class..

That means it supports TFileStream(files..) or
TMemoryStream(memory...) ...
of Object Pascal.


Welcome: http://pages.videotron.com/aminer/

Have fun ! :)


Take care...

Sincerely,
Amine Moulay Ramdane.



From: aminer on

Hello,

As you have noticed , i have followed the Divide and Conquer method...

First you have to know how to program in procedural and Object
Oriented
programming and after that you begin parallel programming ...

The divide an conquer method works very well in parallel programming
also, cause as you have noticed , to be able to engineer the
Parallel
Compression Library and Parallel Sort etc. i first began to engineer
the
following fondations:

- My lock-free ParallelQueue

http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm

- And my Thread Pool Engine that uses my lock-free ParallelQueue

http://pages.videotron.com/aminer/threadpool.htm


After that, i have developped - in Object Pascal - the Parallel
Compression
Library that uses my Thread Pool Engine.

And as you have noticed. ParallelCompression.pas - look inside the
zipfile -,
contains a TCallbacks class and both TParallelGzip , TParallelBzip
classes inherit from TCallbacks..


And as you have noticed also, my Parallel Compression library
works on TStream class..

That means it supports TFileStream(files..) or
TMemoryStream(memory...) ... of Object Pascal.


Welcome: http://pages.videotron.com/aminer/


And have fun ! :)



Sincerely,
Amine Moulay Ramdane.