- The static
MimeString
class works on strings and allows to convert file names into Internet Media Types ("MIME types") or Internet Media Types into appropriate file type extensions. - The
MimeType
class allows:- Building instances from scratch using a fluent API,
- Parsing and validating Internet Media Types,
- Editing Internet Media Type parameters,
- Serializing Internet Media Types as strings according to the standards (see RFC 2045 and RFC 2231) using several formatting options,
- Retrieving a file type extension.
- The
MimeTypeInfo
struct allows memory efficient parsing, validating, and reformatting of Internet Media Type strings and allows to retrieve an appropriate file type extension.
The library is designed to support performance and small heap allocation.
The data for the file type extension parser is collected from:
- Apache
- jshttp/mime-db
- own research.
(The collected data was considered in the specified order. Have a detailed explanation about how this data is ordered and compiled in the comments of MimeResourceCompiler, which is part of this repository.)
- Getting an Internet Media Type ("MIME type") string from a file type extension and vice versa
- Building, serializing, parsing, and editing of MimeType instances
- Formatting a MimeType instance into a standards-compliant string using several options
- Comparison of MimeType instances
- Efficient parsing of an Internet Media Type String