zumime: Media Type Detection from Bytes and File Names
Tells what a file is from its first bytes and from its name,
with no system library. Implements the Web Hypertext Application
Technology Working Group (WHATWG) Multipurpose Internet Mail Extensions
(MIME) Sniffing Standard <https://mimesniff.spec.whatwg.org/> over raw
vectors and paths. Reads inside containers to tell 'Office' documents
from plain 'ZIP' archives, audio from video in 'MP4' files, and 'Word'
from 'Excel' in legacy 'Office' files, and recognises the data files 'R'
users hold, such as files saved by 'R', 'Parquet', 'SQLite' and 'Stata'
files. Every type has a parent in a hierarchy, and an extension
table generated from the Internet Assigned Numbers Authority (IANA)
media types registry and the 'Apache' 'httpd' type map answers from the
name. One call reports both answers, whether they agree, and whether a
file is compressed, encrypted or truncated.
| Version: |
0.1.0 |
| Depends: |
R (≥ 4.1) |
| Suggests: |
testthat (≥ 3.0.0), withr, zucsv, zujson, zukomp |
| Published: |
2026-11-11 |
| DOI: |
10.32614/CRAN.package.zumime (may not be active yet) |
| Author: |
Pedro Baltazar [aut, cre, cph],
Apache Software Foundation [cph] (copyright holder of the httpd
mime.types file the extension table is generated from; see
inst/COPYRIGHTS),
Mark Adler [cph] (copyright holder of puff.c, the inflater
src/zumime_inflate.c is adapted from; see inst/COPYRIGHTS),
The Go Authors [cph] (copyright holder of the net/http sniff cases in
tests/testthat/helper-go-sniff.R; see tests/testthat/COPYRIGHTS),
Sindre Sorhus [cph] (copyright holder of the file-type answers in
tests/testthat/helper-file-type.R; see tests/testthat/COPYRIGHTS) |
| Maintainer: |
Pedro Baltazar <pedrobtz at gmail.com> |
| BugReports: |
https://github.com/pedrobtz/zumime/issues |
| License: |
MIT + file LICENSE |
| Copyright: |
see file COPYRIGHTS |
| URL: |
https://github.com/pedrobtz/zumime,
https://pedrobtz.github.io/zumime/ |
| NeedsCompilation: |
yes |
| Language: |
en-GB |
| Materials: |
README, NEWS |
| CRAN checks: |
zumime results |
Documentation:
Downloads:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=zumime
to link to this page.