[fpc-pascal] helpsystem, some numbers

Marco van de Voort marcov at stack.nl
Tue Oct 28 11:43:39 CET 2008


In our previous episode, Eduardo Morras said:
> >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) 

No question. Follow up on earlier discussions that dismissed chm, and went
for zipped html. I wanted to quantify that a bit. The zip is 30M. 

These discussions were partially on maillists (if not this, then fpc-devel)
and IRC, so you might have missed it.

The background is a bit that Vincent and I are messing with CHM generation
(Vincent for the lhelp package of lazarus, I for the textmode IDE)

> but chm uses LZX compression algorithm internally.

Correct. Slightly modified, it resets the window more often. Note that FPC
has a portable native CHM package with read/write support.

> 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.

Hmm. Then that could actually work. There is a native bzip2 decompressor,
and the dependancy on libbz2 for crafting the helpfile would not be bad.

But the problem is more that that is also again an own invention with
tricks and special crafting, and then it is easier to use an established,
"well defined" (well, at least better than own invention) format as CHM, for
which KDE and gnome etc come with viewers. (though they are fairly slow)

If I have a bit of time, I'll write a wiki page about helpsystems.



More information about the fpc-pascal mailing list