turns out infer already has jpeg2000 support and i somehow didn't notice 0uo

This commit is contained in:
Lynne Megido 2021-02-28 20:20:27 +10:00
parent d76ed2585d
commit b89e71a6ab
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

View File

@ -25,11 +25,6 @@ cfg_if! {
fn init() -> Self {
let mut info = infer::Infer::new();
// jpeg2000 support because why the stinch not
info.add("image/jpeg2000", ".jp2", |buf| {
buf.len() > 23 && buf[..23] == b"\x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A\x6A\x70\x32\x20"[..]
});
info.add("application/vnd.oasis.opendocument.text", "odt", |buf| {
open_document_check(buf, "text")
});