Metadata extraction
ZahirScan attaches format-specific metadata to output JSON. Templates-only mode still includes metadata where the format pipeline produces it; full mode (-f) adds file stats and compression — see CLI.
Use the sidebar under Metadata extraction for field-level detail by category.
Top-level output
Every scan includes templates and file_type. Full mode adds counts and timing; format blocks appear when the parser runs.
| Field | When | Meaning |
|---|---|---|
source | Always (when path known) | Input file path |
file_type | Always | Detected type string (e.g. Csv, Pickle, Image) |
byte_count, line_count, token_count | Full mode | File size and line/token estimates |
processing_time_ms, is_binary | Full mode | Timing and binary heuristic |
compression | Full mode | Template token reduction stats |
writing_footprint | Text-like formats | Prose metrics — Writing footprint |
*_metadata | Per format | One block below; omitted when empty |
By category
| Topic | JSON blocks | Page |
|---|---|---|
| Sampled column profiles | columns[], SQLite ColumnInfo | Column statistics |
| Images, video, audio | image_metadata, video_metadata, audio_metadata | Media |
| Office & ebooks | docx_metadata, pptx_metadata, pdf_metadata, epub_metadata | Documents |
| Logs & JSON structure | log_metadata, json_metadata | Logs & JSON |
| CSV / TSV / PSV | csv_metadata | Delimited text |
| Parquet, Arrow, Avro, ORC | parquet_metadata, … | Columnar binary |
| NumPy, HDF5, NetCDF, … | npy_metadata, hdf5_metadata, … | Scientific arrays |
| Python pickle | pickle_metadata | Python pickle |
| ONNX, GGUF, TFLite, Safetensors | onnx_metadata, … | Models |
| SQLite databases | sqlite_metadata | SQLite |
| TOML, YAML, INI, XML | toml_metadata, … | Settings & XML |
| Source files | code_metadata | Code |
| Web pages | html_metadata | HTML |
| ZIP & TAR | zip_metadata, archive_metadata | Archives |
Tabular formats share column statistics (ColumnStat, typed stat objects). Array and catalog formats use layout blocks instead — see when there are no columns.
Related: Supported formats, Template mining (separate from metadata). Rust API types: docs.rs/zahirscan.