diff --git a/core.d.ts b/core.d.ts index 45b5fe74..2cb39b27 100644 --- a/core.d.ts +++ b/core.d.ts @@ -143,7 +143,8 @@ export type FileExtension = | 'vcf' | 'jls' | 'pst' - | 'dwg'; + | 'dwg' + | 'parquet'; export type MimeType = | 'image/jpeg' @@ -282,7 +283,8 @@ export type MimeType = | 'application/zstd' | 'image/jls' | 'application/vnd.ms-outlook' - | 'image/vnd.dwg'; + | 'image/vnd.dwg' + | 'application/x-parquet'; export type FileTypeResult = { /** diff --git a/core.js b/core.js index f72e47b1..0992de30 100644 --- a/core.js +++ b/core.js @@ -815,6 +815,13 @@ class FileTypeParser { }; } + if (this.checkString('PAR1')) { + return { + ext: 'parquet', + mime: 'application/x-parquet', + }; + } + // -- 5-byte signatures -- if (this.check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { diff --git a/fixture/fixture.parquet b/fixture/fixture.parquet new file mode 100644 index 00000000..db569577 Binary files /dev/null and b/fixture/fixture.parquet differ diff --git a/package.json b/package.json index a84bb7c8..bdbf786e 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,8 @@ "vcf", "jls", "pst", - "dwg" + "dwg", + "parquet" ], "dependencies": { "readable-web-to-node-stream": "^3.0.2", diff --git a/readme.md b/readme.md index ecbd2aac..ab0e257a 100644 --- a/readme.md +++ b/readme.md @@ -440,6 +440,7 @@ Returns a `Set` of supported MIME types. - [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) - Audio file - [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file - [`otf`](https://en.wikipedia.org/wiki/OpenType) - OpenType font +- [`parquet`](https://en.wikipedia.org/wiki/Apache_Parquet) - Apache Parquet - [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format - [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format - [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy diff --git a/supported.js b/supported.js index e1c12f1d..2bb88fb5 100644 --- a/supported.js +++ b/supported.js @@ -141,6 +141,7 @@ export const extensions = [ 'jls', 'pst', 'dwg', + 'parquet', ]; export const mimeTypes = [ @@ -281,4 +282,5 @@ export const mimeTypes = [ 'image/jls', 'application/vnd.ms-outlook', 'image/vnd.dwg', + 'application/x-parquet', ];