Readonlyfirsttext up to the first line feed: what the line-delimited formats decide on
Readonlygzipwhether the document was gzip on the wire
Readonlynamethe source's name, for diagnostics only; never a basis for the decision
Readonlytextthe first bytes of the document, decoded as UTF-8, inflated if the document was gzipped
the beginning of a document, for NodesetFormat.sniff.
textis inflated when the document arrived gzipped, so a sniffer never has to care whether it is looking at a compressed file: compression is a property of how a document was stored, never of what it says. It is decoded as UTF-8, which is lossless for the text formats and, for a binary container, faithful across the ASCII and NUL runs that container formats put their magic in (a tar header, for instance, is ASCII and NUL for its whole first block).