/* libmspack -- a library for working with Microsoft compression formats. * (C) 2003-2019 Stuart Caie * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ namespace LibMSPackSharp.CHM { /// /// A structure which represents a CHM helpfile. /// /// All fields are READ ONLY. /// public class Header { /// /// The version of the CHM file format used in this file. /// public uint Version { get; set; } /// /// 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. /// public uint Timestamp { get; set; } /// /// 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. /// public uint Language { get; set; } /// /// The filename of the CHM helpfile. This is given by the library user /// and may be in any format. /// public string Filename { get; set; } /// /// The length of the CHM helpfile, in bytes. /// public long Length { get; set; } /// /// A list of all non-system files in the CHM helpfile. /// public DecompressFile Files { get; set; } /// /// 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. /// public DecompressFile SysFiles { get; set; } /// /// The section 0 (uncompressed) data in this CHM helpfile. /// public UncompressedSection Sec0 { get; set; } /// /// The section 1 (MSCompressed) data in this CHM helpfile. /// public MSCompressedSection Sec1 { get; set; } /// /// The file offset of the first PMGL/PMGI directory chunk. /// public long DirOffset { get; set; } /// /// The number of PMGL/PMGI directory chunks in this CHM helpfile. /// public uint NumChunks { get; set; } /// /// The size of each PMGL/PMGI chunk, in bytes. /// public uint ChunkSize { get; set; } /// /// The "density" of the quick-reference section in PMGL/PMGI chunks. /// public uint Density { get; set; } /// /// 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... /// public uint Depth { get; set; } /// /// The number of the root PMGI chunk. /// /// If there is no index in the CHM helpfile, this will be 0xFFFFFFFF. /// public uint IndexRoot { get; set; } /// /// The number of the first PMGL chunk. Usually zero. /// Available only in CHM decoder version 2 and above. /// public uint FirstPMGL { get; set; } /// /// The number of the last PMGL chunk. Usually num_chunks-1. /// Available only in CHM decoder version 2 and above. /// public uint LastPMGL { get; set; } /// /// A cache of loaded chunks, filled in by mschm_decoder::fast_find(). /// Available only in CHM decoder version 2 and above. /// public byte[][] ChunkCache { get; set; } } }