Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ export type FileExtension =
| 'vcf'
| 'jls'
| 'pst'
| 'dwg';
| 'dwg'
| 'parquet';

export type MimeType =
| 'image/jpeg'
Expand Down Expand Up @@ -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 = {
/**
Expand Down
7 changes: 7 additions & 0 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down
Binary file added fixture/fixture.parquet
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@
"vcf",
"jls",
"pst",
"dwg"
"dwg",
"parquet"
],
"dependencies": {
"readable-web-to-node-stream": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ Returns a `Set<string>` 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
Expand Down
2 changes: 2 additions & 0 deletions supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const extensions = [
'jls',
'pst',
'dwg',
'parquet',
];

export const mimeTypes = [
Expand Down Expand Up @@ -281,4 +282,5 @@ export const mimeTypes = [
'image/jls',
'application/vnd.ms-outlook',
'image/vnd.dwg',
'application/x-parquet',
];