libmspack
Data Fields
mschmd_header Struct Reference

A structure which represents a CHM helpfile. More...

#include <mspack.h>

Collaboration diagram for mschmd_header:
Collaboration graph
[legend]

Data Fields

unsigned int version
 The version of the CHM file format used in this file. More...
 
unsigned int timestamp
 The "timestamp" of the CHM helpfile. More...
 
unsigned int language
 The default Language and Country ID (LCID) of the user who ran the HTMLHelp Compiler. More...
 
const char * filename
 The filename of the CHM helpfile. More...
 
off_t length
 The length of the CHM helpfile, in bytes. More...
 
struct mschmd_filefiles
 A list of all non-system files in the CHM helpfile. More...
 
struct mschmd_filesysfiles
 A list of all system files in the CHM helpfile. More...
 
struct mschmd_sec_uncompressed sec0
 The section 0 (uncompressed) data in this CHM helpfile. More...
 
struct mschmd_sec_mscompressed sec1
 The section 1 (MSCompressed) data in this CHM helpfile. More...
 
off_t dir_offset
 The file offset of the first PMGL/PMGI directory chunk. More...
 
unsigned int num_chunks
 The number of PMGL/PMGI directory chunks in this CHM helpfile. More...
 
unsigned int chunk_size
 The size of each PMGL/PMGI chunk, in bytes. More...
 
unsigned int density
 The "density" of the quick-reference section in PMGL/PMGI chunks. More...
 
unsigned int depth
 The depth of the index tree. More...
 
unsigned int index_root
 The number of the root PMGI chunk. More...
 
unsigned int first_pmgl
 The number of the first PMGL chunk. More...
 
unsigned int last_pmgl
 The number of the last PMGL chunk. More...
 
unsigned char ** chunk_cache
 A cache of loaded chunks, filled in by mschm_decoder::fast_find(). More...
 

Detailed Description

A structure which represents a CHM helpfile.

All fields are READ ONLY.

Field Documentation

◆ chunk_cache

unsigned char** mschmd_header::chunk_cache

A cache of loaded chunks, filled in by mschm_decoder::fast_find().

Available only in CHM decoder version 2 and above.

◆ chunk_size

unsigned int mschmd_header::chunk_size

The size of each PMGL/PMGI chunk, in bytes.

◆ density

unsigned int mschmd_header::density

The "density" of the quick-reference section in PMGL/PMGI chunks.

◆ depth

unsigned int mschmd_header::depth

The depth of the index tree.

  • if 1, there are no PMGI chunks, only PMGL chunks.
  • if 2, there is 1 PMGI chunk. All chunk indices point to PMGL chunks.
  • if 3, the root PMGI chunk points to secondary PMGI chunks, which in turn point to PMGL chunks.
  • and so on...

◆ dir_offset

off_t mschmd_header::dir_offset

The file offset of the first PMGL/PMGI directory chunk.

◆ filename

const char* mschmd_header::filename

The filename of the CHM helpfile.

This is given by the library user and may be in any format.

◆ files

struct mschmd_file* mschmd_header::files

A list of all non-system files in the CHM helpfile.

◆ first_pmgl

unsigned int mschmd_header::first_pmgl

The number of the first PMGL chunk.

Usually zero. Available only in CHM decoder version 2 and above.

◆ index_root

unsigned int mschmd_header::index_root

The number of the root PMGI chunk.

If there is no index in the CHM helpfile, this will be 0xFFFFFFFF.

◆ language

unsigned int mschmd_header::language

The default Language and Country ID (LCID) of the user who ran the HTMLHelp Compiler.

This is not the language of the CHM file itself.

◆ last_pmgl

unsigned int mschmd_header::last_pmgl

The number of the last PMGL chunk.

Usually num_chunks-1. Available only in CHM decoder version 2 and above.

◆ length

off_t mschmd_header::length

The length of the CHM helpfile, in bytes.

◆ num_chunks

unsigned int mschmd_header::num_chunks

The number of PMGL/PMGI directory chunks in this CHM helpfile.

◆ sec0

struct mschmd_sec_uncompressed mschmd_header::sec0

The section 0 (uncompressed) data in this CHM helpfile.

◆ sec1

struct mschmd_sec_mscompressed mschmd_header::sec1

The section 1 (MSCompressed) data in this CHM helpfile.

◆ sysfiles

struct mschmd_file* mschmd_header::sysfiles

A list of all system files in the CHM helpfile.

System files are files which begin with "::". They are meta-files generated by the CHM creation process.

◆ timestamp

unsigned int mschmd_header::timestamp

The "timestamp" of the CHM helpfile.

It is the lower 32 bits of a 64-bit value representing the number of centiseconds since 1601-01-01 00:00:00 UTC, plus 42. It is not useful as a timestamp, but it is useful as a semi-unique ID.

◆ version

unsigned int mschmd_header::version

The version of the CHM file format used in this file.


The documentation for this struct was generated from the following file: