CHM API Reference
CHM::Decompressor
Constructor
new(source, options = {})
Parameters: * source (String, IO, Handle) - CHM file path or handle * options (Hash) - Configuration options
Options: * :salvage (Boolean) - Enable salvage mode (default: false) * :read_buffer (Integer) - Buffer size (default: 32768)
Example:
decompressor = Cabriolet::CHM::Decompressor.new('help.chm')Instance Methods
header
Returns CHM header information.
Returns: [Cabriolet::Models::CHMHeader](lib/cabriolet/models/chm_header.rb)
sections
Returns CHM sections (directory, content, etc.).
Returns: Array<Cabriolet::Models::CHMSection>
extract_file(filename, output_path)
Extracts a single file.
Parameters: * filename (String) - File to extract * output_path (String) - Destination path
Example:
decompressor.extract_file('index.html', 'output/index.html')CHM::Compressor
Instance Methods
add_html_file(path, options = {})
Adds an HTML file.
Parameters: * path (String) - HTML file path * options (Hash) - File options