Expand description
Format detection: MIME type first, then file extension, then content sniffing.
Enums§
- Format
- A document format this crate knows about (whether or not its feature is enabled).
Functions§
- extension
- File extension of a file name, if any.
- from_
extension - Map a file extension (with or without the dot, any case) to a format.
- from_
mime - Map a MIME type (parameters ignored) to a format.
- is_zip
- Whether the bytes start like a zip archive.
- looks_
textual - Whether the bytes look like text (no NUL bytes in the first 8 KiB).
- ole_
is_ workbook - Whether an OLE compound file holds an Excel workbook stream (
WorkbookorBook). Word, PowerPoint and Outlook files are OLE too but are not supported. - sniff
- Guess the format from the first bytes. Zip containers are not resolved here
(see
crate::extract), because that requires opening the archive.