file-type 17.1.0 → 17.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import {FileTypeResult} from './core.js';
2
2
 
3
3
  /**
4
- Determine file type from a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
4
+ Detect the file type of a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
5
5
 
6
+ @example
6
7
  ```
7
8
  import {fileTypeFromStream} from 'file-type';
8
9
 
@@ -18,8 +19,11 @@ console.log(fileType);
18
19
  export declare function fileTypeFromStream(stream: ReadableStream): Promise<FileTypeResult | undefined>;
19
20
 
20
21
  /**
21
- Determine file type from a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
22
+ Detect the file type of a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
22
23
 
24
+ __Note:__ This method is only available in the browser.
25
+
26
+ @example
23
27
  ```
24
28
  import {fileTypeFromBlob} from 'file-type';
25
29
 
package/core.d.ts CHANGED
@@ -323,8 +323,12 @@ This method is used internally, but can also be used for a special "tokenizer" r
323
323
 
324
324
  A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used.
325
325
 
326
+ @param tokenizer - File source implementing the tokenizer interface.
327
+ @returns The detected file type and MIME type, or `undefined` when there is no match.
328
+
326
329
  An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it is able to *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer.
327
330
 
331
+ @example
328
332
  ```
329
333
  import {makeTokenizer} from '@tokenizer/http';
330
334
  import {fileTypeFromTokenizer} from 'file-type';
@@ -337,9 +341,6 @@ const fileType = await fileTypeFromTokenizer(httpTokenizer);
337
341
  console.log(fileType);
338
342
  //=> {ext: 'mp3', mime: 'audio/mpeg'}
339
343
  ```
340
-
341
- @param tokenizer - File source implementing the tokenizer interface.
342
- @returns The detected file type and MIME type, or `undefined` when there is no match.
343
344
  */
344
345
  export function fileTypeFromTokenizer(tokenizer: ITokenizer): Promise<FileTypeResult | undefined>;
345
346
 
package/core.js CHANGED
@@ -81,11 +81,6 @@ class FileTypeParser {
81
81
  tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;
82
82
  }
83
83
 
84
- // Keep reading until EOF if the file size is unknown.
85
- if (tokenizer.fileInfo.size === undefined) {
86
- tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;
87
- }
88
-
89
84
  this.tokenizer = tokenizer;
90
85
 
91
86
  await tokenizer.peekBuffer(this.buffer, {length: 12, mayBeLess: true});
@@ -151,6 +146,13 @@ class FileTypeParser {
151
146
 
152
147
  // -- 3-byte signatures --
153
148
 
149
+ if (this.check([0x47, 0x49, 0x46])) {
150
+ return {
151
+ ext: 'gif',
152
+ mime: 'image/gif',
153
+ };
154
+ }
155
+
154
156
  if (this.check([0xFF, 0xD8, 0xFF])) {
155
157
  return {
156
158
  ext: 'jpg',
@@ -214,20 +216,6 @@ class FileTypeParser {
214
216
 
215
217
  // -- 4-byte signatures --
216
218
 
217
- if (this.check([0x7F, 0x45, 0x4C, 0x46])) {
218
- return {
219
- ext: 'elf',
220
- mime: 'application/x-elf',
221
- };
222
- }
223
-
224
- if (this.check([0x47, 0x49, 0x46])) {
225
- return {
226
- ext: 'gif',
227
- mime: 'image/gif',
228
- };
229
- }
230
-
231
219
  if (this.checkString('FLIF')) {
232
220
  return {
233
221
  ext: 'flif',
@@ -343,7 +331,7 @@ class FileTypeParser {
343
331
  // - one entry indicating specific type of file.
344
332
  // MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it.
345
333
  if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) {
346
- const mimeType = await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8'));
334
+ const mimeType = (await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8'))).trim();
347
335
 
348
336
  switch (mimeType) {
349
337
  case 'application/epub+zip':
@@ -666,7 +654,7 @@ class FileTypeParser {
666
654
  let ic = 0; // 0 = A, 1 = B, 2 = C, 3
667
655
  // = D
668
656
 
669
- while ((msb & mask) === 0) {
657
+ while ((msb & mask) === 0 && mask !== 0) {
670
658
  ++ic;
671
659
  mask >>= 1;
672
660
  }
@@ -687,7 +675,7 @@ class FileTypeParser {
687
675
  };
688
676
  }
689
677
 
690
- async function readChildren(level, children) {
678
+ async function readChildren(children) {
691
679
  while (children > 0) {
692
680
  const element = await readElement();
693
681
  if (element.id === 0x42_82) {
@@ -701,7 +689,7 @@ class FileTypeParser {
701
689
  }
702
690
 
703
691
  const re = await readElement();
704
- const docType = await readChildren(1, re.len);
692
+ const docType = await readChildren(re.len);
705
693
 
706
694
  switch (docType) {
707
695
  case 'webm':
@@ -798,6 +786,13 @@ class FileTypeParser {
798
786
  };
799
787
  }
800
788
 
789
+ if (this.check([0x7F, 0x45, 0x4C, 0x46])) {
790
+ return {
791
+ ext: 'elf',
792
+ mime: 'application/x-elf',
793
+ };
794
+ }
795
+
801
796
  // -- 5-byte signatures --
802
797
 
803
798
  if (this.check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-type",
3
- "version": "17.1.0",
3
+ "version": "17.1.3",
4
4
  "description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/file-type",
@@ -198,12 +198,13 @@
198
198
  "dependencies": {
199
199
  "readable-web-to-node-stream": "^3.0.2",
200
200
  "strtok3": "^7.0.0-alpha.7",
201
- "token-types": "^5.0.0-alpha.1"
201
+ "token-types": "^5.0.0-alpha.2"
202
202
  },
203
203
  "devDependencies": {
204
204
  "@tokenizer/token": "^0.3.0",
205
205
  "@types/node": "^16.11.10",
206
206
  "ava": "^3.15.0",
207
+ "commonmark": "^0.30.0",
207
208
  "noop-stream": "^1.0.0",
208
209
  "tsd": "^0.19.0",
209
210
  "typescript": "^4.5.2",
package/readme.md CHANGED
@@ -6,6 +6,8 @@ The file type is detected by checking the [magic number](https://en.wikipedia.or
6
6
 
7
7
  This package is for detecting binary-based file formats, not text-based formats like `.txt`, `.csv`, `.svg`, etc.
8
8
 
9
+ We accept contributions for commonly used modern file formats, not historical or obscure ones. Open an issue first for discussion.
10
+
9
11
  <br>
10
12
 
11
13
  ---
@@ -42,6 +44,10 @@ This package is for detecting binary-based file formats, not text-based formats
42
44
  npm install file-type
43
45
  ```
44
46
 
47
+ **This package is a ESM package. Your project needs to be ESM too. [Read more](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).**
48
+
49
+ If you use it with Webpack, you need the latest Webpack version and ensure you configure it correctly for ESM.
50
+
45
51
  ## Usage
46
52
 
47
53
  #### Node.js
@@ -127,18 +133,6 @@ console.log(fileType);
127
133
  //=> {ext: 'jpg', mime: 'image/jpeg'}
128
134
  ```
129
135
 
130
- ```js
131
- import {fileTypeFromBlob} from 'file-type';
132
-
133
- const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
134
- type: 'plain/text',
135
- endings: 'native'
136
- });
137
-
138
- console.log(await fileTypeFromBlob(blob));
139
- //=> {ext: 'txt', mime: 'plain/text'}
140
- ```
141
-
142
136
  ## API
143
137
 
144
138
  ### fileTypeFromBuffer(buffer)
@@ -200,6 +194,33 @@ Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream
200
194
 
201
195
  A readable stream representing file data.
202
196
 
197
+ ### fileTypeFromBlob(blob)
198
+
199
+ Detect the file type of a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
200
+
201
+ **Note:** This method is only available in the browser.
202
+
203
+ The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
204
+
205
+ Returns a `Promise` for an object with the detected file type and MIME type:
206
+
207
+ - `ext` - One of the [supported file types](#supported-file-types)
208
+ - `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type)
209
+
210
+ Or `undefined` when there is no match.
211
+
212
+ ```js
213
+ import {fileTypeFromBlob} from 'file-type';
214
+
215
+ const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
216
+ type: 'plain/text',
217
+ endings: 'native'
218
+ });
219
+
220
+ console.log(await fileTypeFromBlob(blob));
221
+ //=> {ext: 'txt', mime: 'plain/text'}
222
+ ```
223
+
203
224
  ### fileTypeFromTokenizer(tokenizer)
204
225
 
205
226
  Detect the file type from an `ITokenizer` source.
@@ -318,145 +339,145 @@ Returns a `Set<string>` of supported MIME types.
318
339
 
319
340
  ## Supported file types
320
341
 
321
- - [`jpg`](https://en.wikipedia.org/wiki/JPEG) - Joint Photographic Experts Group image
322
- - [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics
342
+ - [`3g2`](https://en.wikipedia.org/wiki/3GP_and_3G2#3G2) - Multimedia container format defined by the 3GPP2 for 3G CDMA2000 multimedia services
343
+ - [`3gp`](https://en.wikipedia.org/wiki/3GP_and_3G2#3GP) - Multimedia container format defined by the Third Generation Partnership Project (3GPP) for 3G UMTS multimedia services
344
+ - [`3mf`](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) - 3D Manufacturing Format
345
+ - [`7z`](https://en.wikipedia.org/wiki/7z) - 7-Zip archive
346
+ - [`Z`](https://fileinfo.com/extension/z) - Unix Compressed File
347
+ - [`aac`](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) - Advanced Audio Coding
348
+ - [`ac3`](https://www.atsc.org/standard/a522012-digital-audio-compression-ac-3-e-ac-3-standard-12172012/) - ATSC A/52 Audio File
349
+ - [`ai`](https://en.wikipedia.org/wiki/Adobe_Illustrator_Artwork) - Adobe Illustrator Artwork
350
+ - [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) - Audio Interchange file
351
+ - [`alias`](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file
352
+ - [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec
353
+ - [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
323
354
  - [`apng`](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics
324
- - [`gif`](https://en.wikipedia.org/wiki/GIF) - Graphics Interchange Format
325
- - [`webp`](https://en.wikipedia.org/wiki/WebP) - Web Picture format
326
- - [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format
327
- - [`xcf`](https://en.wikipedia.org/wiki/XCF_(file_format)) - eXperimental Computing Facility
355
+ - [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) - Archive file
356
+ - [`arrow`](https://arrow.apache.org) - Columnar format for tables of data
357
+ - [`arw`](https://en.wikipedia.org/wiki/Raw_image_format#ARW) - Sony Alpha Raw image file
358
+ - [`asar`](https://github.com/electron/asar#format) - Archive format primarily used to enclose Electron applications
359
+ - [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format
360
+ - [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) - Audio Video Interleave file
361
+ - [`avif`](https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) - AV1 Image File Format
362
+ - [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) - Blender project
363
+ - [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) - Bitmap image file
364
+ - [`bpg`](https://bellard.org/bpg/) - Better Portable Graphics file
365
+ - [`bz2`](https://en.wikipedia.org/wiki/Bzip2) - Archive file
366
+ - [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) - Cabinet file
367
+ - [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compount File Binary Format
368
+ - [`chm`](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help
328
369
  - [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2)
329
370
  - [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3)
330
- - [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file
331
- - [`arw`](https://en.wikipedia.org/wiki/Raw_image_format#ARW) - Sony Alpha Raw image file
371
+ - [`crx`](https://developer.chrome.com/extensions/crx) - Google Chrome extension
372
+ - [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Icon file
373
+ - [`dcm`](https://en.wikipedia.org/wiki/DICOM#Data_format) - DICOM Image File
374
+ - [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) - Debian package
375
+ - [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) - Apple Disk Image
332
376
  - [`dng`](https://en.wikipedia.org/wiki/Digital_Negative) - Adobe Digital Negative image file
333
- - [`nef`](https://www.nikonusa.com/en/learn-and-explore/a/products-and-innovation/nikon-electronic-format-nef.html) - Nikon Electronic Format image file
334
- - [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file
335
- - [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file
336
- - [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) - Tagged Image file
337
- - [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) - Bitmap image file
377
+ - [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word
378
+ - [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF)
379
+ - [`elf`](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) - Unix Executable and Linkable Format
380
+ - [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) - Embedded OpenType font
381
+ - [`eps`](https://en.wikipedia.org/wiki/Encapsulated_PostScript) - Encapsulated PostScript
382
+ - [`epub`](https://en.wikipedia.org/wiki/EPUB) - E-book file
383
+ - [`exe`](https://en.wikipedia.org/wiki/.exe) - Executable file
384
+ - [`f4a`](https://en.wikipedia.org/wiki/Flash_Video) - Audio-only ISO base media file format used by Adobe Flash Player
385
+ - [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player
386
+ - [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player
387
+ - [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player
388
+ - [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec
389
+ - [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format
390
+ - [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video
391
+ - [`gif`](https://en.wikipedia.org/wiki/GIF) - Graphics Interchange Format
392
+ - [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format
393
+ - [`gz`](https://en.wikipedia.org/wiki/Gzip) - Archive file
394
+ - [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format
338
395
  - [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) - Apple Icon image
339
- - [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) - Joint Photographic Experts Group extended range
340
- - [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) - Adobe Photoshop document
396
+ - [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
397
+ - [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
341
398
  - [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format) - Adobe InDesign document
342
- - [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) - Archive file
343
- - [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) - Tarball archive file
344
- - [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) - Archive file
345
- - [`gz`](https://en.wikipedia.org/wiki/Gzip) - Archive file
346
- - [`bz2`](https://en.wikipedia.org/wiki/Bzip2) - Archive file
347
- - [`zst`](https://en.wikipedia.org/wiki/Zstandard) - Archive file
348
- - [`7z`](https://en.wikipedia.org/wiki/7z) - 7-Zip archive
349
- - [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) - Apple Disk Image
350
- - [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 Part 14 video file
399
+ - [`it`](https://wiki.openmpt.org/Manual:_Module_formats#The_Impulse_Tracker_format_.28.it.29) - Audio module format: Impulse Tracker
400
+ - [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
401
+ - [`jpg`](https://en.wikipedia.org/wiki/JPEG) - Joint Photographic Experts Group image
402
+ - [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
403
+ - [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
404
+ - [`jxl`](https://en.wikipedia.org/wiki/JPEG_XL) - JPEG XL image format
405
+ - [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) - Joint Photographic Experts Group extended range
406
+ - [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) - OpenGL and OpenGL ES textures
407
+ - [`lnk`](https://en.wikipedia.org/wiki/Shortcut_%28computing%29#Microsoft_Windows) - Microsoft Windows file shortcut
408
+ - [`lz`](https://en.wikipedia.org/wiki/Lzip) - Arhive file
409
+ - [`lzh`](https://en.wikipedia.org/wiki/LHA_(file_format)) - LZH archive
410
+ - [`m4a`](https://en.wikipedia.org/wiki/M4A) - Audio-only MPEG-4 files
411
+ - [`m4b`](https://en.wikipedia.org/wiki/M4B) - Audiobook and podcast MPEG-4 files, which also contain metadata including chapter markers, images, and hyperlinks
412
+ - [`m4p`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 files with audio streams encrypted by FairPlay Digital Rights Management as were sold through the iTunes Store
413
+ - [`m4v`](https://en.wikipedia.org/wiki/M4V) - MPEG-4 Visual bitstreams
351
414
  - [`mid`](https://en.wikipedia.org/wiki/MIDI) - Musical Instrument Digital Interface file
415
+ - [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information
416
+ - [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000
352
417
  - [`mkv`](https://en.wikipedia.org/wiki/Matroska) - Matroska video file
353
- - [`webm`](https://en.wikipedia.org/wiki/WebM) - Web video file
418
+ - [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
354
419
  - [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) - QuickTime video file
355
- - [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) - Audio Video Interleave file
356
- - [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) - MPEG-1 file
357
420
  - [`mp1`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I) - MPEG-1 Audio Layer I
358
421
  - [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II) - MPEG-1 Audio Layer II
359
422
  - [`mp3`](https://en.wikipedia.org/wiki/MP3) - Audio file
423
+ - [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 Part 14 video file
424
+ - [`mpc`](https://en.wikipedia.org/wiki/Musepack) - Musepack (SV7 & SV8)
425
+ - [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) - MPEG-1 file
426
+ - [`mts`](https://en.wikipedia.org/wiki/.m2ts) - MPEG-2 Transport Stream, both raw and Blu-ray Disc Audio-Video (BDAV) versions
427
+ - [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) - Material Exchange Format
428
+ - [`nef`](https://www.nikonusa.com/en/learn-and-explore/a/products-and-innovation/nikon-electronic-format-nef.html) - Nikon Electronic Format image file
429
+ - [`nes`](https://fileinfo.com/extension/nes) - Nintendo NES ROM
430
+ - [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations
431
+ - [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets
432
+ - [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing
433
+ - [`oga`](https://en.wikipedia.org/wiki/Ogg) - Audio file
360
434
  - [`ogg`](https://en.wikipedia.org/wiki/Ogg) - Audio file
361
- - [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file
362
435
  - [`ogm`](https://en.wikipedia.org/wiki/Ogg) - Audio file
363
- - [`oga`](https://en.wikipedia.org/wiki/Ogg) - Audio file
364
- - [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
436
+ - [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file
365
437
  - [`ogx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
366
438
  - [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) - Audio file
367
- - [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec
368
- - [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file
369
- - [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data
370
- - [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec
371
- - [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format
372
- - [`epub`](https://en.wikipedia.org/wiki/EPUB) - E-book file
373
- - [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
374
- - [`elf`](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) - Unix Executable and Linkable Format
375
- - [`exe`](https://en.wikipedia.org/wiki/.exe) - Executable file
376
- - [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file
377
- - [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
378
- - [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
379
- - [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
380
- - [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) - Embedded OpenType font
381
- - [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font
439
+ - [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file
382
440
  - [`otf`](https://en.wikipedia.org/wiki/OpenType) - OpenType font
383
- - [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
384
- - [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video
441
+ - [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format
442
+ - [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format
443
+ - [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
444
+ - [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics
445
+ - [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Powerpoint
385
446
  - [`ps`](https://en.wikipedia.org/wiki/Postscript) - Postscript
386
- - [`xz`](https://en.wikipedia.org/wiki/Xz) - Compressed file
387
- - [`sqlite`](https://www.sqlite.org/fileformat2.html) - SQLite file
388
- - [`nes`](https://fileinfo.com/extension/nes) - Nintendo NES ROM
389
- - [`crx`](https://developer.chrome.com/extensions/crx) - Google Chrome extension
390
- - [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file
391
- - [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) - Cabinet file
392
- - [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) - Debian package
393
- - [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) - Archive file
447
+ - [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) - Adobe Photoshop document
448
+ - [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data
449
+ - [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file
450
+ - [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) - Archive file
394
451
  - [`rpm`](https://fileinfo.com/extension/rpm) - Red Hat Package Manager file
395
- - [`Z`](https://fileinfo.com/extension/z) - Unix Compressed File
396
- - [`lz`](https://en.wikipedia.org/wiki/Lzip) - Arhive file
397
- - [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compount File Binary Format
398
- - [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) - Material Exchange Format
399
- - [`mts`](https://en.wikipedia.org/wiki/.m2ts) - MPEG-2 Transport Stream, both raw and Blu-ray Disc Audio-Video (BDAV) versions
400
- - [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format
401
- - [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) - Blender project
402
- - [`bpg`](https://bellard.org/bpg/) - Better Portable Graphics file
403
- - [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word
404
- - [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Powerpoint
405
- - [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel
406
- - [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
407
- - [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
408
- - [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
409
- - [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000
410
- - [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) - Audio Interchange file
411
- - [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing
412
- - [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets
413
- - [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations
414
- - [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language
415
- - [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format
416
- - [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Icon file
417
- - [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) - OpenGL and OpenGL ES textures
418
- - [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
419
- - [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
420
- - [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format
421
- - [`dcm`](https://en.wikipedia.org/wiki/DICOM#Data_format) - DICOM Image File
422
- - [`mpc`](https://en.wikipedia.org/wiki/Musepack) - Musepack (SV7 & SV8)
423
- - [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
424
- - [`vcf`](https://en.wikipedia.org/wiki/VCard) - vCard
425
- - [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format
426
- - [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format
427
- - [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF)
428
- - [`lnk`](https://en.wikipedia.org/wiki/Shortcut_%28computing%29#Microsoft_Windows) - Microsoft Windows file shortcut
429
- - [`alias`](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file
430
- - [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File
431
- - [`ac3`](https://www.atsc.org/standard/a522012-digital-audio-compression-ac-3-e-ac-3-standard-12172012/) - ATSC A/52 Audio File
432
- - [`3gp`](https://en.wikipedia.org/wiki/3GP_and_3G2#3GP) - Multimedia container format defined by the Third Generation Partnership Project (3GPP) for 3G UMTS multimedia services
433
- - [`3g2`](https://en.wikipedia.org/wiki/3GP_and_3G2#3G2) - Multimedia container format defined by the 3GPP2 for 3G CDMA2000 multimedia services
434
- - [`m4v`](https://en.wikipedia.org/wiki/M4V) - MPEG-4 Visual bitstreams
435
- - [`m4p`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 files with audio streams encrypted by FairPlay Digital Rights Management as were sold through the iTunes Store
436
- - [`m4a`](https://en.wikipedia.org/wiki/M4A) - Audio-only MPEG-4 files
437
- - [`m4b`](https://en.wikipedia.org/wiki/M4B) - Audiobook and podcast MPEG-4 files, which also contain metadata including chapter markers, images, and hyperlinks
438
- - [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player
439
- - [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player
440
- - [`f4a`](https://en.wikipedia.org/wiki/Flash_Video) - Audio-only ISO base media file format used by Adobe Flash Player
441
- - [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player
442
- - [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information
443
- - [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
444
- - [`arrow`](https://arrow.apache.org) - Columnar format for tables of data
445
- - [`aac`](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) - Advanced Audio Coding
446
- - [`it`](https://wiki.openmpt.org/Manual:_Module_formats#The_Impulse_Tracker_format_.28.it.29) - Audio module format: Impulse Tracker
452
+ - [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
453
+ - [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file
447
454
  - [`s3m`](https://wiki.openmpt.org/Manual:_Module_formats#The_ScreamTracker_3_format_.28.s3m.29) - Audio module format: ScreamTracker 3
448
- - [`xm`](https://wiki.openmpt.org/Manual:_Module_formats#The_FastTracker_2_format_.28.xm.29) - Audio module format: FastTracker 2
449
- - [`ai`](https://en.wikipedia.org/wiki/Adobe_Illustrator_Artwork) - Adobe Illustrator Artwork
455
+ - [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
450
456
  - [`skp`](https://en.wikipedia.org/wiki/SketchUp) - SketchUp
451
- - [`avif`](https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) - AV1 Image File Format
452
- - [`eps`](https://en.wikipedia.org/wiki/Encapsulated_PostScript) - Encapsulated PostScript
453
- - [`lzh`](https://en.wikipedia.org/wiki/LHA_(file_format)) - LZH archive
454
- - [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
455
- - [`asar`](https://github.com/electron/asar#format) - Archive format primarily used to enclose Electron applications
457
+ - [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
458
+ - [`sqlite`](https://www.sqlite.org/fileformat2.html) - SQLite file
456
459
  - [`stl`](https://en.wikipedia.org/wiki/STL_(file_format)) - Standard Tesselated Geometry File Format (ASCII only)
457
- - [`chm`](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help
458
- - [`3mf`](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) - 3D Manufacturing Format
459
- - [`jxl`](https://en.wikipedia.org/wiki/JPEG_XL) - JPEG XL image format
460
+ - [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file
461
+ - [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) - Tarball archive file
462
+ - [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) - Tagged Image file
463
+ - [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font
464
+ - [`vcf`](https://en.wikipedia.org/wiki/VCard) - vCard
465
+ - [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File
466
+ - [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format
467
+ - [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file
468
+ - [`webm`](https://en.wikipedia.org/wiki/WebM) - Web video file
469
+ - [`webp`](https://en.wikipedia.org/wiki/WebP) - Web Picture format
470
+ - [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
471
+ - [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
472
+ - [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
473
+ - [`xcf`](https://en.wikipedia.org/wiki/XCF_(file_format)) - eXperimental Computing Facility
474
+ - [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel
475
+ - [`xm`](https://wiki.openmpt.org/Manual:_Module_formats#The_FastTracker_2_format_.28.xm.29) - Audio module format: FastTracker 2
476
+ - [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language
477
+ - [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file
478
+ - [`xz`](https://en.wikipedia.org/wiki/Xz) - Compressed file
479
+ - [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) - Archive file
480
+ - [`zst`](https://en.wikipedia.org/wiki/Zstandard) - Archive file
460
481
 
461
482
  *Pull requests are welcome for additional commonly used file types.*
462
483