pub fn compact_structured(content: &str, ext: Option<&str>) -> Option<String>Expand description
Best-effort lossless compaction selected by file extension.
.json/.geojson → single document; .jsonl/.ndjson → line-delimited.
With no (or an unknown) extension, attempts single-document JSON when the
content looks like JSON. Returns None when nothing smaller applies.