file-type 17.1.1 → 17.1.2
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 +6 -2
- package/core.d.ts +4 -3
- package/core.js +1 -6
- package/package.json +2 -1
- package/readme.md +148 -129
package/browser.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {FileTypeResult} from './core.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
|
|
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
|
-
|
|
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});
|
|
@@ -336,7 +331,7 @@ class FileTypeParser {
|
|
|
336
331
|
// - one entry indicating specific type of file.
|
|
337
332
|
// MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it.
|
|
338
333
|
if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) {
|
|
339
|
-
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();
|
|
340
335
|
|
|
341
336
|
switch (mimeType) {
|
|
342
337
|
case 'application/epub+zip':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-type",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.2",
|
|
4
4
|
"description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/file-type",
|
|
@@ -204,6 +204,7 @@
|
|
|
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
|
@@ -44,6 +44,10 @@ We accept contributions for commonly used modern file formats, not historical or
|
|
|
44
44
|
npm install file-type
|
|
45
45
|
```
|
|
46
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
|
+
|
|
47
51
|
## Usage
|
|
48
52
|
|
|
49
53
|
#### Node.js
|
|
@@ -129,18 +133,6 @@ console.log(fileType);
|
|
|
129
133
|
//=> {ext: 'jpg', mime: 'image/jpeg'}
|
|
130
134
|
```
|
|
131
135
|
|
|
132
|
-
```js
|
|
133
|
-
import {fileTypeFromBlob} from 'file-type';
|
|
134
|
-
|
|
135
|
-
const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
|
|
136
|
-
type: 'plain/text',
|
|
137
|
-
endings: 'native'
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
console.log(await fileTypeFromBlob(blob));
|
|
141
|
-
//=> {ext: 'txt', mime: 'plain/text'}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
136
|
## API
|
|
145
137
|
|
|
146
138
|
### fileTypeFromBuffer(buffer)
|
|
@@ -202,6 +194,33 @@ Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream
|
|
|
202
194
|
|
|
203
195
|
A readable stream representing file data.
|
|
204
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
|
+
|
|
205
224
|
### fileTypeFromTokenizer(tokenizer)
|
|
206
225
|
|
|
207
226
|
Detect the file type from an `ITokenizer` source.
|
|
@@ -320,145 +339,145 @@ Returns a `Set<string>` of supported MIME types.
|
|
|
320
339
|
|
|
321
340
|
## Supported file types
|
|
322
341
|
|
|
323
|
-
- [`
|
|
324
|
-
- [`
|
|
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
|
|
325
354
|
- [`apng`](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics
|
|
326
|
-
- [`
|
|
327
|
-
- [`
|
|
328
|
-
- [`
|
|
329
|
-
- [`
|
|
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
|
|
330
369
|
- [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2)
|
|
331
370
|
- [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3)
|
|
332
|
-
- [`
|
|
333
|
-
- [`
|
|
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
|
|
334
376
|
- [`dng`](https://en.wikipedia.org/wiki/Digital_Negative) - Adobe Digital Negative image file
|
|
335
|
-
- [`
|
|
336
|
-
- [`
|
|
337
|
-
- [`
|
|
338
|
-
- [`
|
|
339
|
-
- [`
|
|
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
|
|
340
395
|
- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) - Apple Icon image
|
|
341
|
-
- [`
|
|
342
|
-
- [`
|
|
396
|
+
- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
|
|
397
|
+
- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
|
|
343
398
|
- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format) - Adobe InDesign document
|
|
344
|
-
- [`
|
|
345
|
-
- [`
|
|
346
|
-
- [`
|
|
347
|
-
- [`
|
|
348
|
-
- [`
|
|
349
|
-
- [`
|
|
350
|
-
- [`
|
|
351
|
-
- [`
|
|
352
|
-
- [`
|
|
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
|
|
353
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
|
|
354
417
|
- [`mkv`](https://en.wikipedia.org/wiki/Matroska) - Matroska video file
|
|
355
|
-
- [`
|
|
418
|
+
- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
|
|
356
419
|
- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) - QuickTime video file
|
|
357
|
-
- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) - Audio Video Interleave file
|
|
358
|
-
- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) - MPEG-1 file
|
|
359
420
|
- [`mp1`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I) - MPEG-1 Audio Layer I
|
|
360
421
|
- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II) - MPEG-1 Audio Layer II
|
|
361
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
|
|
362
434
|
- [`ogg`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
363
|
-
- [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
364
435
|
- [`ogm`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
365
|
-
- [`
|
|
366
|
-
- [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
436
|
+
- [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
367
437
|
- [`ogx`](https://en.wikipedia.org/wiki/Ogg) - Audio file
|
|
368
438
|
- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) - Audio file
|
|
369
|
-
- [`
|
|
370
|
-
- [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file
|
|
371
|
-
- [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data
|
|
372
|
-
- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec
|
|
373
|
-
- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format
|
|
374
|
-
- [`epub`](https://en.wikipedia.org/wiki/EPUB) - E-book file
|
|
375
|
-
- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
|
|
376
|
-
- [`elf`](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) - Unix Executable and Linkable Format
|
|
377
|
-
- [`exe`](https://en.wikipedia.org/wiki/.exe) - Executable file
|
|
378
|
-
- [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file
|
|
379
|
-
- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format
|
|
380
|
-
- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
|
|
381
|
-
- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format
|
|
382
|
-
- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) - Embedded OpenType font
|
|
383
|
-
- [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font
|
|
439
|
+
- [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file
|
|
384
440
|
- [`otf`](https://en.wikipedia.org/wiki/OpenType) - OpenType font
|
|
385
|
-
- [`
|
|
386
|
-
- [`
|
|
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
|
|
387
446
|
- [`ps`](https://en.wikipedia.org/wiki/Postscript) - Postscript
|
|
388
|
-
- [`
|
|
389
|
-
- [`
|
|
390
|
-
- [`
|
|
391
|
-
- [`
|
|
392
|
-
- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file
|
|
393
|
-
- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) - Cabinet file
|
|
394
|
-
- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) - Debian package
|
|
395
|
-
- [`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
|
|
396
451
|
- [`rpm`](https://fileinfo.com/extension/rpm) - Red Hat Package Manager file
|
|
397
|
-
- [`
|
|
398
|
-
- [`
|
|
399
|
-
- [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compount File Binary Format
|
|
400
|
-
- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) - Material Exchange Format
|
|
401
|
-
- [`mts`](https://en.wikipedia.org/wiki/.m2ts) - MPEG-2 Transport Stream, both raw and Blu-ray Disc Audio-Video (BDAV) versions
|
|
402
|
-
- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format
|
|
403
|
-
- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) - Blender project
|
|
404
|
-
- [`bpg`](https://bellard.org/bpg/) - Better Portable Graphics file
|
|
405
|
-
- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word
|
|
406
|
-
- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Powerpoint
|
|
407
|
-
- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel
|
|
408
|
-
- [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
409
|
-
- [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
410
|
-
- [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
411
|
-
- [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000
|
|
412
|
-
- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) - Audio Interchange file
|
|
413
|
-
- [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing
|
|
414
|
-
- [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets
|
|
415
|
-
- [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations
|
|
416
|
-
- [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language
|
|
417
|
-
- [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format
|
|
418
|
-
- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Icon file
|
|
419
|
-
- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) - OpenGL and OpenGL ES textures
|
|
420
|
-
- [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
|
|
421
|
-
- [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
|
|
422
|
-
- [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format
|
|
423
|
-
- [`dcm`](https://en.wikipedia.org/wiki/DICOM#Data_format) - DICOM Image File
|
|
424
|
-
- [`mpc`](https://en.wikipedia.org/wiki/Musepack) - Musepack (SV7 & SV8)
|
|
425
|
-
- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
|
|
426
|
-
- [`vcf`](https://en.wikipedia.org/wiki/VCard) - vCard
|
|
427
|
-
- [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format
|
|
428
|
-
- [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format
|
|
429
|
-
- [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF)
|
|
430
|
-
- [`lnk`](https://en.wikipedia.org/wiki/Shortcut_%28computing%29#Microsoft_Windows) - Microsoft Windows file shortcut
|
|
431
|
-
- [`alias`](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file
|
|
432
|
-
- [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File
|
|
433
|
-
- [`ac3`](https://www.atsc.org/standard/a522012-digital-audio-compression-ac-3-e-ac-3-standard-12172012/) - ATSC A/52 Audio File
|
|
434
|
-
- [`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
|
|
435
|
-
- [`3g2`](https://en.wikipedia.org/wiki/3GP_and_3G2#3G2) - Multimedia container format defined by the 3GPP2 for 3G CDMA2000 multimedia services
|
|
436
|
-
- [`m4v`](https://en.wikipedia.org/wiki/M4V) - MPEG-4 Visual bitstreams
|
|
437
|
-
- [`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
|
|
438
|
-
- [`m4a`](https://en.wikipedia.org/wiki/M4A) - Audio-only MPEG-4 files
|
|
439
|
-
- [`m4b`](https://en.wikipedia.org/wiki/M4B) - Audiobook and podcast MPEG-4 files, which also contain metadata including chapter markers, images, and hyperlinks
|
|
440
|
-
- [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player
|
|
441
|
-
- [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player
|
|
442
|
-
- [`f4a`](https://en.wikipedia.org/wiki/Flash_Video) - Audio-only ISO base media file format used by Adobe Flash Player
|
|
443
|
-
- [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player
|
|
444
|
-
- [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information
|
|
445
|
-
- [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
|
|
446
|
-
- [`arrow`](https://arrow.apache.org) - Columnar format for tables of data
|
|
447
|
-
- [`aac`](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) - Advanced Audio Coding
|
|
448
|
-
- [`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
|
|
449
454
|
- [`s3m`](https://wiki.openmpt.org/Manual:_Module_formats#The_ScreamTracker_3_format_.28.s3m.29) - Audio module format: ScreamTracker 3
|
|
450
|
-
- [`
|
|
451
|
-
- [`ai`](https://en.wikipedia.org/wiki/Adobe_Illustrator_Artwork) - Adobe Illustrator Artwork
|
|
455
|
+
- [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
|
|
452
456
|
- [`skp`](https://en.wikipedia.org/wiki/SketchUp) - SketchUp
|
|
453
|
-
- [`
|
|
454
|
-
- [`
|
|
455
|
-
- [`lzh`](https://en.wikipedia.org/wiki/LHA_(file_format)) - LZH archive
|
|
456
|
-
- [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
|
|
457
|
-
- [`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
|
|
458
459
|
- [`stl`](https://en.wikipedia.org/wiki/STL_(file_format)) - Standard Tesselated Geometry File Format (ASCII only)
|
|
459
|
-
- [`
|
|
460
|
-
- [`
|
|
461
|
-
- [`
|
|
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
|
|
462
481
|
|
|
463
482
|
*Pull requests are welcome for additional commonly used file types.*
|
|
464
483
|
|