khellang / MimeTypes

A simple lookup from file name/extension to MIME/media type, generated from mime-db, which in turn is compiled from IANA, Apache and nginx's MIME types.
Apache License 2.0
93 stars 23 forks source link

Update comicbook file extensions #24

Closed rluetzner closed 7 months ago

rluetzner commented 9 months ago

cb7, cba, cbr, cbt and cbz all refer to different types of digital comicbooks. The last letter of the extension indicates the compression algorithm that was used: 7zip, arc, rar, tar or zip.

All these filetypes used to have the application/x-cbr MIME type assigned to them. However, that has since been deprecated and was replaced with

Only these two are officially listed by IANA

https://www.iana.org/assignments/media-types/application/vnd.comicbook+zip

. cbr and cbz are by far the most common file extensions for comicbooks.

There's no official MIME type for cb7, cba or cbt files. However, with rar being a proprietary compression algorithm, FOSS applications will often refuse to handle files that identify themselves as application/x-cbr, so I decided to assign extension specific MIME types to them. I've seen these being used by other applications, specifically comic book readers.

I've read through the docs on iana.org, but haven't figured out why they chose -rar, but +zip.

This fixes #23.

rluetzner commented 7 months ago

See https://github.com/jshttp/mime-db/issues/321.