
# The built-in decoders' caps -- each one bounds what a decoder reads, so each
# changes committed bytes, and a changed value re-extracts every document at
# the next `fux ingest` (it is part of the extract-config digest). Every key is
# REQUIRED (SR-LAW-12); `fux doctor --fix` writes a missing one. The keys are
# decided in SR-DECODE: https://github.com/arpitarya/fux/blob/main/records/0139_decode.md
#
# [limits.zip] is the shared ZIP reader under docx, pptx and xlsx.
# [limits.json] max_depth is shared by json, jsonl, toml and xml.
# [limits.xml] is the shared XML reader under xml, svg, drawio, docx, pptx and xlsx.

[limits.zip]
max_uncompressed = 67108864
max_members      = 4096
max_member_bytes = 33554432

[limits.csv]
max_cell_chars = 500

[limits.drawio]
max_inflated = 16777216

[limits.html]
charset_scan_bytes  = 4096
# W-287 A4: in a table with no <th>, the header is the first row whose filled
# cells reach this percent of the table's width; rows above it are prose. It
# decides which words are COLUMN NAMES -- what a row passage cites -- not which
# words are indexed. At 1 the first row is always the header, as before.
header_fill_percent = 60

[limits.image]
max_inflated = 1048576

[limits.json]
max_depth         = 6
max_heading_depth = 2
min_prose_len     = 3
max_items         = 500

[limits.jsonl]
max_records = 500

[limits.mail]
max_body_chars = 200000
max_messages   = 500

[limits.pdf]
max_streams    = 5000
max_inflated   = 67108864
max_text_chars = 2000000

[limits.rtf]
max_chars = 2000000

[limits.xlsx]
max_cols            = 40
# W-287 A4: as [limits.html] -- a sheet's title banner is prose, not a header.
# 60: a one-cell banner over a 2-column table is not a header; a header naming
# 3 of 5 columns is.
header_fill_percent = 60

[limits.xml]
min_attr_len = 12
prolog_bytes = 8192

[limits.yaml]
max_depth     = 6
indent_step   = 2
min_value_len = 3
