This section is an addon to Matthew Russotto's page; "Microsoft's HTML Help (.chm) format", which is available at http://www.speakeasy.org/~russotto/chm/chmformat.html. It details a few facts not included in that page.
The LCID in the initial header is the LCID of the OS at the time of compilation, not the one stored in the HHP file. It is unknown whether or not this is the system LCID (from GetSystemDefaultLCID), the user LCID (from GetUserDefaultLCID) or the thread LCID (from GetThreadLocale). It is likely to be GetUserDefaultLCID since that is the function that ITSS.DLL depends on. If you have the facility to check this please let us know of the result.
The LCID in the directory header is from the program that compiled the ITSF, definately not the one stored in the HHP file or from the OS. On Win32 this LCID comes from ITSS.DLL (at offset 0xB306 in version 4.72.8085.0 of that file), which provides the GUID that follows it.
Between the chunk entries and the quickref entries is chunk length - ( num entries / n + !!( num entries % n ) ) * 2 bytes worth of free space. This usually contains the same data from the same offsets in the previous chunk, and can be zeroed out, with no effect on the decoder and a slight increase in the compressability of the file with zip/gzip/bzip2 & probably other crunchers. The free space is usually partial/junk chunk entries, free space and/or quickref entries.