Skip to content

Commit

Permalink
Update comicbook file extensions
Browse files Browse the repository at this point in the history
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

- `application/vnd.comicbook-rar` for rar compressed files and
- `application/vnd.comicbook+zip` for rar compressed files.

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 khellang#23.
  • Loading branch information
rluetzner committed Feb 14, 2024
1 parent c664132 commit 52778e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/MimeTypes/MimeTypes.NullableAttributes.cs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@
{ "cap", "application/vnd.tcpdump.pcap" },
{ "car", "application/vnd.curl.car" },
{ "cat", "application/vnd.ms-pki.seccat" },
{ "cb7", "application/x-cbr" },
{ "cba", "application/x-cbr" },
{ "cbr", "application/x-cbr" },
{ "cbt", "application/x-cbr" },
{ "cbz", "application/x-cbr" },
{ "cb7", "application/x-cb7" },
{ "cba", "application/x-cba" },
{ "cbr", "application/vnd.comicbook-rar" },
{ "cbt", "application/x-cbt" },
{ "cbz", "application/vnd.comicbook+zip" },
{ "cc", "text/x-c" },
{ "cco", "application/x-cocoa" },
{ "cct", "application/x-director" },
Expand Down
10 changes: 5 additions & 5 deletions src/MimeTypes/MimeTypes.cs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@
{ "cap", "application/vnd.tcpdump.pcap" },
{ "car", "application/vnd.curl.car" },
{ "cat", "application/vnd.ms-pki.seccat" },
{ "cb7", "application/x-cbr" },
{ "cba", "application/x-cbr" },
{ "cbr", "application/x-cbr" },
{ "cbt", "application/x-cbr" },
{ "cbz", "application/x-cbr" },
{ "cb7", "application/x-cb7" },
{ "cba", "application/x-cba" },
{ "cbr", "application/vnd.comicbook-rar" },
{ "cbt", "application/x-cbt" },
{ "cbz", "application/vnd.comicbook+zip" },
{ "cc", "text/x-c" },
{ "cco", "application/x-cocoa" },
{ "cct", "application/x-director" },
Expand Down

0 comments on commit 52778e9

Please sign in to comment.