Skip to contents

From bytes

The WHATWG sniffing algorithm, with zumime’s containers and formats.

mime_sniff()
Sniff a type from bytes

From the name

mime_guess()
Guess a type from a file name
mime_extensions()
Extensions of a type

Both, with the how-to-open columns

mime_type()
Type files from their bytes and their names
mime_check()
Is a file one of these types?

The hierarchy

mime_parent()
The lineage of a type
mime_is()
Is a type one of these?
mime_types()
The type registry

The MIME type record

mime_parse() mime_format()
Parse and serialise MIME types

Detectors for the session

mime_register() mime_unregister()
Register a type for the session

Streams

mime_sniffer() mime_push() mime_finish()
Sniff a stream chunk by chunk

The package

zumime_info()
Build information
zumime zumime-package
zumime: Media Type Detection from Bytes and File Names