Skip to main content

Module sniff

Module sniff 

Source
Expand description

§4.1 input format sniffing.

sniff_format peeks the first ~4 KiB of a BufRead without consuming the content bytes (BOM bytes are consumed). The same buffered reader is then handed to a parser, which sees the still-pristine stream.

Structs§

SniffOutcome
Outcome of sniff_format.

Constants§

SNIFF_PROBE_BYTES
Maximum prefix size used for sniffing, per §4.1 (“first ~4 KiB”).

Functions§

sniff_format
Peek the input and decide its format per §4.1.