Skip to content

.NET Library that supports working with Internet Media Types ("MIME Types")

License

Notifications You must be signed in to change notification settings

FolkerKinzel/MimeTypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FolkerKinzel.MimeTypes

NuGet GitHub

.NET Library that supports working with Internet Media Types ("MIME Types")

Project Reference and Release Notes

  • 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 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. To have a a detailed explanation where the data for the file type extension parser comes from and how it is compiled, have a look at MimeResourceCompiler that is part of this repository.

Version History

Code Examples

  1. Getting an Internet Media Type ("MIME type") string from a file type extension and vice versa
  2. Building, serializing, parsing, and editing of MimeType instances
  3. Formatting a MimeType instance into a standards-compliant string using several options
  4. Comparison of MimeType instances
  5. Efficient parsing of an Internet Media Type String

About

.NET Library that supports working with Internet Media Types ("MIME Types")

Resources

License

Stars

Watchers

Forks