ThinkMeta LogoDeutsch
English
fpZip: Compression

When creating ZIP archives the compression for each file can be done independently from each other. Only during the writing of the compressed data into the archive the process must be serialized.

fpZip creates an asynchronous task for each file to be compressed. The pseudo code in an asynchronous programming language is as follows:

CompressFiles(files)
{
  Memory inMemory[files.count];
  Memory outMemory[files.count];
  for (i = 0; i < files.count; ++i) {
    ReadFile(files[i], inMemory[i]);
    Compress(inMemory[i], outMemory[i]);
  }
}

The compression function can be further split up into two asynchronous tasks for the Deflate and CRC32 algorithm:

Compress(inMemory, outMemory)
{
  Deflate(inMemory, outMemory);
  CRC32(inMemory);
}

Thus we get the following dependency diagram:

fpZip