At 15:19 27/10/2008, you wrote:

This morning I did a bit research after the help files, I hope it sheds some
light on the WHY for the recent CHM efforts:

                     html           html
help package    size on disk(k)  real size(k) chm(k)
rtl                38816          22096       1865
lcl                107404         72499       5227
fcl                8548            5148        445
-------------------------------------------------------
All                154768         99743       7537

The disk is NTFS, so probably 4kb clustersize.

Total html bzip2'ed :  2.9MB or so
Total html zipped   :  25MB
total chm  bzip2'ed :  6,7MB

Extraction time html: 1 minute+ (Core 2 6600 (2.4GHz), winXP's unzip)
Extraction time chm : not measurable.

Note that while the bzip2 archive is very small, it must be unpacked
entirely before use, contrary to either zip (in theory you could open the
zip and extract only the one file) and chm (which has several indexes
internally too, the unpacked chm is possibly larger than the html due to
this)

Don't know what's your question (perhaps you posted on wrong list) but chm uses LZX compression algorithm internally. You can see that you can't compress too much a chm (from 7,5 MB to 6,7). Bzip2 is block oriented and you can decompress each block separately. You can choose between 100K to 900K block sizes that corresponds to 1-9 bzip2 switch. Bzip2 has the same API than zlib and (if my memory don't fails) allows you to extract a single file.

HTH
No virus found in this outgoing message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.4/1749 - Release Date: 27/10/2008 7:57
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to