Module magic_data

Module magic_data 

Source
Expand description

Centralized registry of magic header signatures across format types.

Statics§

COMPILED_CTB_MAGIC_RULES
Global compiled hierarchical magic rules defined specifically by ctoolbox (ctoolbox.magic).
COMPILED_FILE_MAGIC_RULES
Global compiled hierarchical magic rules from upstream file / Magdir.
COMPILED_MAGIC_DATABASE
Global compiled hierarchical magic database loaded from in-repo custom definitions (ctoolbox.magic) and upstream Magdir rule files.
COMPILED_MAGIC_RULES
Legacy alias providing all rules combined.
COMPILED_MAGIC_TEMPLATES
Global compiled named template subroutines.

Functions§

get_ctb_magic_content
Returns the content of ctoolbox.magic from the asset bundle or repository assets.
get_magdir_files
Returns all bundled Magdir rule files as (relative_path, content_bytes) pairs.