pub fn guess(head: &[u8], whole: bool) -> Option<FileFormat>Expand description
What text no format’s signature claims is, from its first bytes head; whole
when they are all there is, so a last line without a newline is complete. None
for bytes that are not text, which a local file shows in the hex view.
JSON only when the bytes parse as JSON so far; NDJSON when the first line is an object. CSV or TSV only when several complete records have one field count, two or more, with quotes where CSV allows them. Anything else is lines.