fpZip: Decompression
During the extraction from a ZIP archive the decompression for each file can
be done independently from each other.
fpZip creates an asynchronous task for each file to be decompressed as soon
as the compressed data is read into memory. The pseudo code in an
asynchronous programming language is as follows:
ExtractArchive(archive)
{
Memory inMemory;
ReadFile(archive, inMemory);
Memory outMemory[archive.fileCount];
for (i = 0; i < archive.fileCount; ++i)
Decompress(archive.file[i], inMemory, outMemory[i]);
}
Decompress(file, inMemory, outMemory)
{
Inflate(inMemory, outMemory);
crc = CRC32(outMemory);
WriteFile(file, outMemory);
FileCheck(crc);
}
Thus we get the following dependency diagram:
|