mime-bytes 0.1.1 → 0.3.0

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.
@@ -11,881 +11,881 @@ exports.getContentTypeForExtension = getContentTypeForExtension;
11
11
  exports.FILE_TYPES = [
12
12
  // Image Formats
13
13
  {
14
- name: "png",
15
- magicBytes: ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"],
16
- mimeType: "image/png",
17
- extensions: ["png", "apng"],
18
- description: "Portable Network Graphics",
19
- category: "image",
20
- charset: "binary"
21
- },
22
- {
23
- name: "jpeg",
24
- magicBytes: ["0xFF", "0xD8", "0xFF"],
25
- mimeType: "image/jpeg",
26
- extensions: ["jpg", "jpeg", "jpe", "jif", "jfif"],
27
- description: "JPEG image format",
28
- category: "image"
29
- },
30
- {
31
- name: "gif",
32
- magicBytes: ["0x47", "0x49", "0x46", "0x38", "0x37", "0x61"],
33
- mimeType: "image/gif",
34
- extensions: ["gif"],
35
- description: "Graphics Interchange Format (GIF87a)",
36
- category: "image"
37
- },
38
- {
39
- name: "gif89a",
40
- magicBytes: ["0x47", "0x49", "0x46", "0x38", "0x39", "0x61"],
41
- mimeType: "image/gif",
42
- extensions: ["gif"],
43
- description: "Graphics Interchange Format (GIF89a)",
44
- category: "image"
45
- },
46
- {
47
- name: "webp",
48
- magicBytes: ["0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x57", "0x45", "0x42", "0x50"],
49
- mimeType: "image/webp",
50
- extensions: ["webp"],
51
- description: "WebP image format",
52
- category: "image"
53
- },
54
- {
55
- name: "qoi",
56
- magicBytes: ["0x71", "0x6F", "0x69", "0x66"],
57
- mimeType: "image/qoi",
58
- extensions: ["qoi"],
59
- description: "Quite OK Image Format",
60
- category: "image"
14
+ name: 'png',
15
+ magicBytes: ['0x89', '0x50', '0x4E', '0x47', '0x0D', '0x0A', '0x1A', '0x0A'],
16
+ mimeType: 'image/png',
17
+ extensions: ['png', 'apng'],
18
+ description: 'Portable Network Graphics',
19
+ category: 'image',
20
+ charset: 'binary'
21
+ },
22
+ {
23
+ name: 'jpeg',
24
+ magicBytes: ['0xFF', '0xD8', '0xFF'],
25
+ mimeType: 'image/jpeg',
26
+ extensions: ['jpg', 'jpeg', 'jpe', 'jif', 'jfif'],
27
+ description: 'JPEG image format',
28
+ category: 'image'
29
+ },
30
+ {
31
+ name: 'gif',
32
+ magicBytes: ['0x47', '0x49', '0x46', '0x38', '0x37', '0x61'],
33
+ mimeType: 'image/gif',
34
+ extensions: ['gif'],
35
+ description: 'Graphics Interchange Format (GIF87a)',
36
+ category: 'image'
37
+ },
38
+ {
39
+ name: 'gif89a',
40
+ magicBytes: ['0x47', '0x49', '0x46', '0x38', '0x39', '0x61'],
41
+ mimeType: 'image/gif',
42
+ extensions: ['gif'],
43
+ description: 'Graphics Interchange Format (GIF89a)',
44
+ category: 'image'
45
+ },
46
+ {
47
+ name: 'webp',
48
+ magicBytes: ['0x52', '0x49', '0x46', '0x46', '?', '?', '?', '?', '0x57', '0x45', '0x42', '0x50'],
49
+ mimeType: 'image/webp',
50
+ extensions: ['webp'],
51
+ description: 'WebP image format',
52
+ category: 'image'
53
+ },
54
+ {
55
+ name: 'qoi',
56
+ magicBytes: ['0x71', '0x6F', '0x69', '0x66'],
57
+ mimeType: 'image/qoi',
58
+ extensions: ['qoi'],
59
+ description: 'Quite OK Image Format',
60
+ category: 'image'
61
61
  },
62
62
  // PCT (Apple PICT) - No reliable magic bytes, extension-based detection only
63
63
  {
64
- name: "pct",
64
+ name: 'pct',
65
65
  magicBytes: [], // PCT files don't have consistent magic bytes
66
- mimeType: "image/x-pict",
67
- extensions: ["pct", "pic", "pict"],
68
- description: "Apple PICT image format (legacy)",
69
- category: "image"
66
+ mimeType: 'image/x-pict',
67
+ extensions: ['pct', 'pic', 'pict'],
68
+ description: 'Apple PICT image format (legacy)',
69
+ category: 'image'
70
70
  },
71
71
  // TGA (Truevision Targa) - No reliable magic bytes at offset 0
72
72
  {
73
- name: "tga",
73
+ name: 'tga',
74
74
  magicBytes: [], // TGA files don't have magic bytes at the beginning
75
- mimeType: "image/x-targa",
76
- extensions: ["tga", "icb", "vda", "vst"],
77
- description: "Truevision TGA image format",
78
- category: "image"
75
+ mimeType: 'image/x-targa',
76
+ extensions: ['tga', 'icb', 'vda', 'vst'],
77
+ description: 'Truevision TGA image format',
78
+ category: 'image'
79
79
  },
80
80
  {
81
- name: "bmp",
82
- magicBytes: ["0x42", "0x4D"],
83
- mimeType: "image/bmp",
84
- extensions: ["bmp"],
85
- description: "Bitmap image format",
86
- category: "image"
81
+ name: 'bmp',
82
+ magicBytes: ['0x42', '0x4D'],
83
+ mimeType: 'image/bmp',
84
+ extensions: ['bmp'],
85
+ description: 'Bitmap image format',
86
+ category: 'image'
87
87
  },
88
88
  {
89
- name: "ico",
90
- magicBytes: ["0x00", "0x00", "0x01", "0x00"],
91
- mimeType: "image/x-icon",
92
- extensions: ["ico"],
93
- description: "Icon format",
94
- category: "image"
89
+ name: 'ico',
90
+ magicBytes: ['0x00', '0x00', '0x01', '0x00'],
91
+ mimeType: 'image/x-icon',
92
+ extensions: ['ico'],
93
+ description: 'Icon format',
94
+ category: 'image'
95
95
  },
96
96
  {
97
- name: "tiff",
98
- magicBytes: ["0x49", "0x49", "0x2A", "0x00"],
99
- mimeType: "image/tiff",
100
- extensions: ["tif", "tiff"],
101
- description: "Tagged Image File Format (little-endian)",
102
- category: "image"
97
+ name: 'tiff',
98
+ magicBytes: ['0x49', '0x49', '0x2A', '0x00'],
99
+ mimeType: 'image/tiff',
100
+ extensions: ['tif', 'tiff'],
101
+ description: 'Tagged Image File Format (little-endian)',
102
+ category: 'image'
103
103
  },
104
104
  {
105
- name: "tiff-be",
106
- magicBytes: ["0x4D", "0x4D", "0x00", "0x2A"],
107
- mimeType: "image/tiff",
108
- extensions: ["tif", "tiff"],
109
- description: "Tagged Image File Format (big-endian)",
110
- category: "image"
105
+ name: 'tiff-be',
106
+ magicBytes: ['0x4D', '0x4D', '0x00', '0x2A'],
107
+ mimeType: 'image/tiff',
108
+ extensions: ['tif', 'tiff'],
109
+ description: 'Tagged Image File Format (big-endian)',
110
+ category: 'image'
111
111
  },
112
112
  // Archive Formats
113
113
  {
114
- name: "zip",
115
- magicBytes: ["0x50", "0x4B", "0x03", "0x04"],
116
- mimeType: "application/zip",
117
- extensions: ["zip", "aar", "apk", "docx", "epub", "ipa", "jar", "kmz", "maff", "msix", "odp", "ods", "odt", "pk3", "pk4", "pptx", "usdz", "vsdx", "xlsx", "xpi", "whl"],
118
- description: "ZIP archive and related formats",
119
- category: "archive"
114
+ name: 'zip',
115
+ magicBytes: ['0x50', '0x4B', '0x03', '0x04'],
116
+ mimeType: 'application/zip',
117
+ extensions: ['zip', 'aar', 'apk', 'docx', 'epub', 'ipa', 'jar', 'kmz', 'maff', 'msix', 'odp', 'ods', 'odt', 'pk3', 'pk4', 'pptx', 'usdz', 'vsdx', 'xlsx', 'xpi', 'whl'],
118
+ description: 'ZIP archive and related formats',
119
+ category: 'archive'
120
120
  },
121
121
  {
122
- name: "zip-empty",
123
- magicBytes: ["0x50", "0x4B", "0x05", "0x06"],
124
- mimeType: "application/zip",
125
- extensions: ["zip"],
126
- description: "Empty ZIP archive",
127
- category: "archive"
122
+ name: 'zip-empty',
123
+ magicBytes: ['0x50', '0x4B', '0x05', '0x06'],
124
+ mimeType: 'application/zip',
125
+ extensions: ['zip'],
126
+ description: 'Empty ZIP archive',
127
+ category: 'archive'
128
128
  },
129
129
  {
130
- name: "zip-spanned",
131
- magicBytes: ["0x50", "0x4B", "0x07", "0x08"],
132
- mimeType: "application/zip",
133
- extensions: ["zip"],
134
- description: "Spanned ZIP archive",
135
- category: "archive"
130
+ name: 'zip-spanned',
131
+ magicBytes: ['0x50', '0x4B', '0x07', '0x08'],
132
+ mimeType: 'application/zip',
133
+ extensions: ['zip'],
134
+ description: 'Spanned ZIP archive',
135
+ category: 'archive'
136
136
  },
137
137
  {
138
- name: "rar",
139
- magicBytes: ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x00"],
140
- mimeType: "application/x-rar-compressed",
141
- extensions: ["rar"],
142
- description: "RAR archive format",
143
- category: "archive"
138
+ name: 'rar',
139
+ magicBytes: ['0x52', '0x61', '0x72', '0x21', '0x1A', '0x07', '0x00'],
140
+ mimeType: 'application/x-rar-compressed',
141
+ extensions: ['rar'],
142
+ description: 'RAR archive format',
143
+ category: 'archive'
144
144
  },
145
145
  {
146
- name: "rar5",
147
- magicBytes: ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x01", "0x00"],
148
- mimeType: "application/x-rar-compressed",
149
- extensions: ["rar"],
150
- description: "RAR5 archive format",
151
- category: "archive"
146
+ name: 'rar5',
147
+ magicBytes: ['0x52', '0x61', '0x72', '0x21', '0x1A', '0x07', '0x01', '0x00'],
148
+ mimeType: 'application/x-rar-compressed',
149
+ extensions: ['rar'],
150
+ description: 'RAR5 archive format',
151
+ category: 'archive'
152
152
  },
153
153
  {
154
- name: "7z",
155
- magicBytes: ["0x37", "0x7A", "0xBC", "0xAF", "0x27", "0x1C"],
156
- mimeType: "application/x-7z-compressed",
157
- extensions: ["7z"],
158
- description: "7-Zip archive format",
159
- category: "archive"
154
+ name: '7z',
155
+ magicBytes: ['0x37', '0x7A', '0xBC', '0xAF', '0x27', '0x1C'],
156
+ mimeType: 'application/x-7z-compressed',
157
+ extensions: ['7z'],
158
+ description: '7-Zip archive format',
159
+ category: 'archive'
160
160
  },
161
161
  {
162
- name: "tar",
163
- magicBytes: ["0x75", "0x73", "0x74", "0x61", "0x72"],
164
- mimeType: "application/x-tar",
165
- extensions: ["tar"],
162
+ name: 'tar',
163
+ magicBytes: ['0x75', '0x73', '0x74', '0x61', '0x72'],
164
+ mimeType: 'application/x-tar',
165
+ extensions: ['tar'],
166
166
  offset: 257,
167
- description: "TAR archive",
168
- category: "archive"
167
+ description: 'TAR archive',
168
+ category: 'archive'
169
169
  },
170
170
  {
171
- name: "gz",
172
- magicBytes: ["0x1F", "0x8B"],
173
- mimeType: "application/gzip",
174
- extensions: ["gz", "gzip"],
175
- description: "GZIP compressed file",
176
- category: "archive"
171
+ name: 'gz',
172
+ magicBytes: ['0x1F', '0x8B'],
173
+ mimeType: 'application/gzip',
174
+ extensions: ['gz', 'gzip'],
175
+ description: 'GZIP compressed file',
176
+ category: 'archive'
177
177
  },
178
178
  {
179
- name: "bz2",
180
- magicBytes: ["0x42", "0x5A", "0x68"],
181
- mimeType: "application/x-bzip2",
182
- extensions: ["bz2"],
183
- description: "BZIP2 compressed file",
184
- category: "archive"
179
+ name: 'bz2',
180
+ magicBytes: ['0x42', '0x5A', '0x68'],
181
+ mimeType: 'application/x-bzip2',
182
+ extensions: ['bz2'],
183
+ description: 'BZIP2 compressed file',
184
+ category: 'archive'
185
185
  },
186
186
  {
187
- name: "xz",
188
- magicBytes: ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00"],
189
- mimeType: "application/x-xz",
190
- extensions: ["xz"],
191
- description: "XZ compressed file",
192
- category: "archive"
187
+ name: 'xz',
188
+ magicBytes: ['0xFD', '0x37', '0x7A', '0x58', '0x5A', '0x00'],
189
+ mimeType: 'application/x-xz',
190
+ extensions: ['xz'],
191
+ description: 'XZ compressed file',
192
+ category: 'archive'
193
193
  },
194
194
  // Document Formats
195
195
  {
196
- name: "pdf",
197
- magicBytes: ["0x25", "0x50", "0x44", "0x46"],
198
- mimeType: "application/pdf",
199
- extensions: ["pdf"],
200
- description: "Portable Document Format",
201
- category: "document"
196
+ name: 'pdf',
197
+ magicBytes: ['0x25', '0x50', '0x44', '0x46'],
198
+ mimeType: 'application/pdf',
199
+ extensions: ['pdf'],
200
+ description: 'Portable Document Format',
201
+ category: 'document'
202
202
  },
203
203
  {
204
- name: "ps",
205
- magicBytes: ["0x25", "0x21", "0x50", "0x53"],
206
- mimeType: "application/postscript",
207
- extensions: ["ps"],
208
- description: "PostScript document",
209
- category: "document"
204
+ name: 'ps',
205
+ magicBytes: ['0x25', '0x21', '0x50', '0x53'],
206
+ mimeType: 'application/postscript',
207
+ extensions: ['ps'],
208
+ description: 'PostScript document',
209
+ category: 'document'
210
210
  },
211
211
  {
212
- name: "eps",
213
- magicBytes: ["0x25", "0x21", "0x50", "0x53", "0x2D", "0x41", "0x64", "0x6F", "0x62", "0x65"],
214
- mimeType: "application/eps",
215
- extensions: ["eps", "epsf"],
216
- description: "Encapsulated PostScript",
217
- category: "document"
212
+ name: 'eps',
213
+ magicBytes: ['0x25', '0x21', '0x50', '0x53', '0x2D', '0x41', '0x64', '0x6F', '0x62', '0x65'],
214
+ mimeType: 'application/eps',
215
+ extensions: ['eps', 'epsf'],
216
+ description: 'Encapsulated PostScript',
217
+ category: 'document'
218
218
  },
219
219
  {
220
- name: "rtf",
221
- magicBytes: ["0x7B", "0x5C", "0x72", "0x74", "0x66"],
222
- mimeType: "application/rtf",
223
- extensions: ["rtf"],
224
- description: "Rich Text Format",
225
- category: "document"
220
+ name: 'rtf',
221
+ magicBytes: ['0x7B', '0x5C', '0x72', '0x74', '0x66'],
222
+ mimeType: 'application/rtf',
223
+ extensions: ['rtf'],
224
+ description: 'Rich Text Format',
225
+ category: 'document'
226
226
  },
227
227
  // Media Formats
228
228
  {
229
- name: "mp4",
230
- magicBytes: ["0x66", "0x74", "0x79", "0x70"],
231
- mimeType: "video/mp4",
232
- extensions: ["mp4", "m4v", "m4p", "m4b", "f4v", "f4p", "f4b", "f4a"],
229
+ name: 'mp4',
230
+ magicBytes: ['0x66', '0x74', '0x79', '0x70'],
231
+ mimeType: 'video/mp4',
232
+ extensions: ['mp4', 'm4v', 'm4p', 'm4b', 'f4v', 'f4p', 'f4b', 'f4a'],
233
233
  offset: 4,
234
- description: "MP4 video format",
235
- category: "video"
234
+ description: 'MP4 video format',
235
+ category: 'video'
236
236
  },
237
237
  {
238
- name: "3gp",
239
- magicBytes: ["0x66", "0x74", "0x79", "0x70", "0x33", "0x67"],
240
- mimeType: "video/3gpp",
241
- extensions: ["3gp", "3g2"],
238
+ name: '3gp',
239
+ magicBytes: ['0x66', '0x74', '0x79', '0x70', '0x33', '0x67'],
240
+ mimeType: 'video/3gpp',
241
+ extensions: ['3gp', '3g2'],
242
242
  offset: 4,
243
- description: "3GP video format",
244
- category: "video"
243
+ description: '3GP video format',
244
+ category: 'video'
245
245
  },
246
246
  {
247
- name: "heic",
248
- magicBytes: ["0x66", "0x74", "0x79", "0x70", "0x68", "0x65", "0x69", "0x63"],
249
- mimeType: "image/heic",
250
- extensions: ["heic"],
247
+ name: 'heic',
248
+ magicBytes: ['0x66', '0x74', '0x79', '0x70', '0x68', '0x65', '0x69', '0x63'],
249
+ mimeType: 'image/heic',
250
+ extensions: ['heic'],
251
251
  offset: 4,
252
- description: "High Efficiency Image Container",
253
- category: "image"
252
+ description: 'High Efficiency Image Container',
253
+ category: 'image'
254
254
  },
255
255
  {
256
- name: "heif",
257
- magicBytes: ["0x66", "0x74", "0x79", "0x70", "0x6D", "0x69", "0x66", "0x31"],
258
- mimeType: "image/heif",
259
- extensions: ["heif"],
256
+ name: 'heif',
257
+ magicBytes: ['0x66', '0x74', '0x79', '0x70', '0x6D', '0x69', '0x66', '0x31'],
258
+ mimeType: 'image/heif',
259
+ extensions: ['heif'],
260
260
  offset: 4,
261
- description: "High Efficiency Image Format",
262
- category: "image"
261
+ description: 'High Efficiency Image Format',
262
+ category: 'image'
263
263
  },
264
264
  {
265
- name: "mp3",
266
- magicBytes: ["0x49", "0x44", "0x33"],
267
- mimeType: "audio/mpeg",
268
- extensions: ["mp3"],
269
- description: "MP3 audio format",
270
- category: "audio"
265
+ name: 'mp3',
266
+ magicBytes: ['0x49', '0x44', '0x33'],
267
+ mimeType: 'audio/mpeg',
268
+ extensions: ['mp3'],
269
+ description: 'MP3 audio format',
270
+ category: 'audio'
271
271
  },
272
272
  {
273
- name: "mp3-sync",
274
- magicBytes: ["0xFF", "0xFB"],
275
- mimeType: "audio/mpeg",
276
- extensions: ["mp3"],
277
- description: "MP3 audio format (sync)",
278
- category: "audio"
273
+ name: 'mp3-sync',
274
+ magicBytes: ['0xFF', '0xFB'],
275
+ mimeType: 'audio/mpeg',
276
+ extensions: ['mp3'],
277
+ description: 'MP3 audio format (sync)',
278
+ category: 'audio'
279
279
  },
280
280
  {
281
- name: "flac",
282
- magicBytes: ["0x66", "0x4C", "0x61", "0x43"],
283
- mimeType: "audio/flac",
284
- extensions: ["flac"],
285
- description: "FLAC audio format",
286
- category: "audio"
281
+ name: 'flac',
282
+ magicBytes: ['0x66', '0x4C', '0x61', '0x43'],
283
+ mimeType: 'audio/flac',
284
+ extensions: ['flac'],
285
+ description: 'FLAC audio format',
286
+ category: 'audio'
287
287
  },
288
288
  {
289
- name: "wav",
290
- magicBytes: ["0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x57", "0x41", "0x56", "0x45"],
291
- mimeType: "audio/wav",
292
- extensions: ["wav"],
293
- description: "WAV audio format",
294
- category: "audio"
289
+ name: 'wav',
290
+ magicBytes: ['0x52', '0x49', '0x46', '0x46', '?', '?', '?', '?', '0x57', '0x41', '0x56', '0x45'],
291
+ mimeType: 'audio/wav',
292
+ extensions: ['wav'],
293
+ description: 'WAV audio format',
294
+ category: 'audio'
295
295
  },
296
296
  {
297
- name: "ogg",
298
- magicBytes: ["0x4F", "0x67", "0x67", "0x53"],
299
- mimeType: "audio/ogg",
300
- extensions: ["ogg", "oga", "ogv"],
301
- description: "OGG container format",
302
- category: "audio"
297
+ name: 'ogg',
298
+ magicBytes: ['0x4F', '0x67', '0x67', '0x53'],
299
+ mimeType: 'audio/ogg',
300
+ extensions: ['ogg', 'oga', 'ogv'],
301
+ description: 'OGG container format',
302
+ category: 'audio'
303
303
  },
304
304
  {
305
- name: "avi",
306
- magicBytes: ["0x52", "0x49", "0x46", "0x46", "?", "?", "?", "?", "0x41", "0x56", "0x49", "0x20"],
307
- mimeType: "video/x-msvideo",
308
- extensions: ["avi"],
309
- description: "AVI video format",
310
- category: "video"
305
+ name: 'avi',
306
+ magicBytes: ['0x52', '0x49', '0x46', '0x46', '?', '?', '?', '?', '0x41', '0x56', '0x49', '0x20'],
307
+ mimeType: 'video/x-msvideo',
308
+ extensions: ['avi'],
309
+ description: 'AVI video format',
310
+ category: 'video'
311
311
  },
312
312
  {
313
- name: "mkv",
314
- magicBytes: ["0x1A", "0x45", "0xDF", "0xA3"],
315
- mimeType: "video/x-matroska",
316
- extensions: ["mkv", "mka", "mks", "mk3d", "webm"],
317
- description: "Matroska video format",
318
- category: "video"
313
+ name: 'mkv',
314
+ magicBytes: ['0x1A', '0x45', '0xDF', '0xA3'],
315
+ mimeType: 'video/x-matroska',
316
+ extensions: ['mkv', 'mka', 'mks', 'mk3d', 'webm'],
317
+ description: 'Matroska video format',
318
+ category: 'video'
319
319
  },
320
320
  {
321
- name: "mov",
322
- magicBytes: ["0x66", "0x74", "0x79", "0x70", "0x71", "0x74"],
323
- mimeType: "video/quicktime",
324
- extensions: ["mov"],
321
+ name: 'mov',
322
+ magicBytes: ['0x66', '0x74', '0x79', '0x70', '0x71', '0x74'],
323
+ mimeType: 'video/quicktime',
324
+ extensions: ['mov'],
325
325
  offset: 4,
326
- description: "QuickTime video format",
327
- category: "video"
326
+ description: 'QuickTime video format',
327
+ category: 'video'
328
328
  },
329
329
  // Executable Formats
330
330
  {
331
- name: "exe",
332
- magicBytes: ["0x4D", "0x5A"],
333
- mimeType: "application/x-msdownload",
334
- extensions: ["exe", "dll", "mui", "sys", "scr", "cpl", "ocx", "ax", "iec", "ime", "rs", "tsp", "fon", "efi"],
335
- description: "Windows PE executable",
336
- category: "executable"
331
+ name: 'exe',
332
+ magicBytes: ['0x4D', '0x5A'],
333
+ mimeType: 'application/x-msdownload',
334
+ extensions: ['exe', 'dll', 'mui', 'sys', 'scr', 'cpl', 'ocx', 'ax', 'iec', 'ime', 'rs', 'tsp', 'fon', 'efi'],
335
+ description: 'Windows PE executable',
336
+ category: 'executable'
337
337
  },
338
338
  {
339
- name: "elf",
340
- magicBytes: ["0x7F", "0x45", "0x4C", "0x46"],
341
- mimeType: "application/x-elf",
342
- extensions: ["elf", "axf", "bin", "o", "out", "prx", "puff", "ko", "mod", "so"],
343
- description: "ELF executable format",
344
- category: "executable"
339
+ name: 'elf',
340
+ magicBytes: ['0x7F', '0x45', '0x4C', '0x46'],
341
+ mimeType: 'application/x-elf',
342
+ extensions: ['elf', 'axf', 'bin', 'o', 'out', 'prx', 'puff', 'ko', 'mod', 'so'],
343
+ description: 'ELF executable format',
344
+ category: 'executable'
345
345
  },
346
346
  {
347
- name: "macho-32",
348
- magicBytes: ["0xFE", "0xED", "0xFA", "0xCE"],
349
- mimeType: "application/x-mach-binary",
350
- extensions: ["macho"],
351
- description: "Mach-O 32-bit executable format",
352
- category: "executable"
347
+ name: 'macho-32',
348
+ magicBytes: ['0xFE', '0xED', '0xFA', '0xCE'],
349
+ mimeType: 'application/x-mach-binary',
350
+ extensions: ['macho'],
351
+ description: 'Mach-O 32-bit executable format',
352
+ category: 'executable'
353
353
  },
354
354
  {
355
- name: "macho-64",
356
- magicBytes: ["0xFE", "0xED", "0xFA", "0xCF"],
357
- mimeType: "application/x-mach-binary",
358
- extensions: ["macho"],
359
- description: "Mach-O 64-bit executable format",
360
- category: "executable"
355
+ name: 'macho-64',
356
+ magicBytes: ['0xFE', '0xED', '0xFA', '0xCF'],
357
+ mimeType: 'application/x-mach-binary',
358
+ extensions: ['macho'],
359
+ description: 'Mach-O 64-bit executable format',
360
+ category: 'executable'
361
361
  },
362
362
  {
363
- name: "macho-universal",
364
- magicBytes: ["0xCA", "0xFE", "0xBA", "0xBE"],
365
- mimeType: "application/x-mach-binary",
366
- extensions: ["macho"],
367
- description: "Mach-O universal binary",
368
- category: "executable"
363
+ name: 'macho-universal',
364
+ magicBytes: ['0xCA', '0xFE', '0xBA', '0xBE'],
365
+ mimeType: 'application/x-mach-binary',
366
+ extensions: ['macho'],
367
+ description: 'Mach-O universal binary',
368
+ category: 'executable'
369
369
  },
370
370
  {
371
- name: "class",
372
- magicBytes: ["0xCA", "0xFE", "0xBA", "0xBE"],
373
- mimeType: "application/java-vm",
374
- extensions: ["class"],
375
- description: "Java class file",
376
- category: "executable"
371
+ name: 'class',
372
+ magicBytes: ['0xCA', '0xFE', '0xBA', '0xBE'],
373
+ mimeType: 'application/java-vm',
374
+ extensions: ['class'],
375
+ description: 'Java class file',
376
+ category: 'executable'
377
377
  },
378
378
  {
379
- name: "dex",
380
- magicBytes: ["0x64", "0x65", "0x78", "0x0A", "0x30", "0x33", "0x35", "0x00"],
381
- mimeType: "application/x-dex",
382
- extensions: ["dex"],
383
- description: "Dalvik Executable",
384
- category: "executable"
379
+ name: 'dex',
380
+ magicBytes: ['0x64', '0x65', '0x78', '0x0A', '0x30', '0x33', '0x35', '0x00'],
381
+ mimeType: 'application/x-dex',
382
+ extensions: ['dex'],
383
+ description: 'Dalvik Executable',
384
+ category: 'executable'
385
385
  },
386
386
  {
387
- name: "wasm",
388
- magicBytes: ["0x00", "0x61", "0x73", "0x6D"],
389
- mimeType: "application/wasm",
390
- extensions: ["wasm"],
391
- description: "WebAssembly binary format",
392
- category: "executable"
387
+ name: 'wasm',
388
+ magicBytes: ['0x00', '0x61', '0x73', '0x6D'],
389
+ mimeType: 'application/wasm',
390
+ extensions: ['wasm'],
391
+ description: 'WebAssembly binary format',
392
+ category: 'executable'
393
393
  },
394
394
  // Font Formats
395
395
  {
396
- name: "ttf",
397
- magicBytes: ["0x00", "0x01", "0x00", "0x00"],
398
- mimeType: "font/ttf",
399
- extensions: ["ttf"],
400
- description: "TrueType font",
401
- category: "font"
396
+ name: 'ttf',
397
+ magicBytes: ['0x00', '0x01', '0x00', '0x00'],
398
+ mimeType: 'font/ttf',
399
+ extensions: ['ttf'],
400
+ description: 'TrueType font',
401
+ category: 'font'
402
402
  },
403
403
  {
404
- name: "otf",
405
- magicBytes: ["0x4F", "0x54", "0x54", "0x4F"],
406
- mimeType: "font/otf",
407
- extensions: ["otf"],
408
- description: "OpenType font",
409
- category: "font"
404
+ name: 'otf',
405
+ magicBytes: ['0x4F', '0x54', '0x54', '0x4F'],
406
+ mimeType: 'font/otf',
407
+ extensions: ['otf'],
408
+ description: 'OpenType font',
409
+ category: 'font'
410
410
  },
411
411
  {
412
- name: "woff",
413
- magicBytes: ["0x77", "0x4F", "0x46", "0x46"],
414
- mimeType: "font/woff",
415
- extensions: ["woff"],
416
- description: "Web Open Font Format",
417
- category: "font"
412
+ name: 'woff',
413
+ magicBytes: ['0x77', '0x4F', '0x46', '0x46'],
414
+ mimeType: 'font/woff',
415
+ extensions: ['woff'],
416
+ description: 'Web Open Font Format',
417
+ category: 'font'
418
418
  },
419
419
  {
420
- name: "woff2",
421
- magicBytes: ["0x77", "0x4F", "0x46", "0x32"],
422
- mimeType: "font/woff2",
423
- extensions: ["woff2"],
424
- description: "Web Open Font Format 2",
425
- category: "font"
420
+ name: 'woff2',
421
+ magicBytes: ['0x77', '0x4F', '0x46', '0x32'],
422
+ mimeType: 'font/woff2',
423
+ extensions: ['woff2'],
424
+ description: 'Web Open Font Format 2',
425
+ category: 'font'
426
426
  },
427
427
  {
428
- name: "eot",
429
- magicBytes: ["0x4C", "0x50"],
430
- mimeType: "application/vnd.ms-fontobject",
431
- extensions: ["eot"],
428
+ name: 'eot',
429
+ magicBytes: ['0x4C', '0x50'],
430
+ mimeType: 'application/vnd.ms-fontobject',
431
+ extensions: ['eot'],
432
432
  offset: 34,
433
- description: "Embedded OpenType font",
434
- category: "font"
433
+ description: 'Embedded OpenType font',
434
+ category: 'font'
435
435
  },
436
436
  // Database Formats
437
437
  {
438
- name: "sqlite",
439
- magicBytes: ["0x53", "0x51", "0x4C", "0x69", "0x74", "0x65", "0x20", "0x66", "0x6F", "0x72", "0x6D", "0x61", "0x74", "0x20", "0x33", "0x00"],
440
- mimeType: "application/x-sqlite3",
441
- extensions: ["sqlite", "sqlite3", "db", "db3"],
442
- description: "SQLite database",
443
- category: "database"
438
+ name: 'sqlite',
439
+ magicBytes: ['0x53', '0x51', '0x4C', '0x69', '0x74', '0x65', '0x20', '0x66', '0x6F', '0x72', '0x6D', '0x61', '0x74', '0x20', '0x33', '0x00'],
440
+ mimeType: 'application/x-sqlite3',
441
+ extensions: ['sqlite', 'sqlite3', 'db', 'db3'],
442
+ description: 'SQLite database',
443
+ category: 'database'
444
444
  },
445
445
  // Text Formats with BOM
446
446
  {
447
- name: "utf8",
448
- magicBytes: ["0xEF", "0xBB", "0xBF"],
449
- mimeType: "text/plain",
450
- extensions: ["txt", "xml", "json", "csv", "md", "html", "css", "js", "ts", "py", "java", "c", "cpp", "h", "hpp", "sql", "yaml", "yml", "toml", "ini", "cfg", "conf", "log"],
451
- description: "UTF-8 text with BOM",
452
- category: "text",
453
- charset: "utf-8"
447
+ name: 'utf8',
448
+ magicBytes: ['0xEF', '0xBB', '0xBF'],
449
+ mimeType: 'text/plain',
450
+ extensions: ['txt', 'xml', 'json', 'csv', 'md', 'html', 'css', 'js', 'ts', 'py', 'java', 'c', 'cpp', 'h', 'hpp', 'sql', 'yaml', 'yml', 'toml', 'ini', 'cfg', 'conf', 'log'],
451
+ description: 'UTF-8 text with BOM',
452
+ category: 'text',
453
+ charset: 'utf-8'
454
454
  },
455
455
  {
456
- name: "utf16le",
457
- magicBytes: ["0xFF", "0xFE"],
458
- mimeType: "text/plain",
459
- extensions: ["txt", "xml", "json", "csv", "md", "html", "css", "js", "ts", "py", "java", "c", "cpp", "h", "hpp"],
460
- description: "UTF-16 LE text with BOM",
461
- category: "text"
456
+ name: 'utf16le',
457
+ magicBytes: ['0xFF', '0xFE'],
458
+ mimeType: 'text/plain',
459
+ extensions: ['txt', 'xml', 'json', 'csv', 'md', 'html', 'css', 'js', 'ts', 'py', 'java', 'c', 'cpp', 'h', 'hpp'],
460
+ description: 'UTF-16 LE text with BOM',
461
+ category: 'text'
462
462
  },
463
463
  {
464
- name: "utf16be",
465
- magicBytes: ["0xFE", "0xFF"],
466
- mimeType: "text/plain",
467
- extensions: ["txt", "xml", "json", "csv", "md", "html", "css", "js", "ts", "py", "java", "c", "cpp", "h", "hpp"],
468
- description: "UTF-16 BE text with BOM",
469
- category: "text"
464
+ name: 'utf16be',
465
+ magicBytes: ['0xFE', '0xFF'],
466
+ mimeType: 'text/plain',
467
+ extensions: ['txt', 'xml', 'json', 'csv', 'md', 'html', 'css', 'js', 'ts', 'py', 'java', 'c', 'cpp', 'h', 'hpp'],
468
+ description: 'UTF-16 BE text with BOM',
469
+ category: 'text'
470
470
  },
471
471
  {
472
- name: "utf32le",
473
- magicBytes: ["0xFF", "0xFE", "0x00", "0x00"],
474
- mimeType: "text/plain",
475
- extensions: ["txt", "xml", "json", "csv", "md", "html", "css", "js", "ts", "py", "java", "c", "cpp", "h", "hpp"],
476
- description: "UTF-32 LE text with BOM",
477
- category: "text"
472
+ name: 'utf32le',
473
+ magicBytes: ['0xFF', '0xFE', '0x00', '0x00'],
474
+ mimeType: 'text/plain',
475
+ extensions: ['txt', 'xml', 'json', 'csv', 'md', 'html', 'css', 'js', 'ts', 'py', 'java', 'c', 'cpp', 'h', 'hpp'],
476
+ description: 'UTF-32 LE text with BOM',
477
+ category: 'text'
478
478
  },
479
479
  {
480
- name: "utf32be",
481
- magicBytes: ["0x00", "0x00", "0xFE", "0xFF"],
482
- mimeType: "text/plain",
483
- extensions: ["txt", "xml", "json", "csv", "md", "html", "css", "js", "ts", "py", "java", "c", "cpp", "h", "hpp"],
484
- description: "UTF-32 BE text with BOM",
485
- category: "text"
480
+ name: 'utf32be',
481
+ magicBytes: ['0x00', '0x00', '0xFE', '0xFF'],
482
+ mimeType: 'text/plain',
483
+ extensions: ['txt', 'xml', 'json', 'csv', 'md', 'html', 'css', 'js', 'ts', 'py', 'java', 'c', 'cpp', 'h', 'hpp'],
484
+ description: 'UTF-32 BE text with BOM',
485
+ category: 'text'
486
486
  },
487
487
  // Other Formats
488
488
  {
489
- name: "xml",
490
- magicBytes: ["0x3C", "0x3F", "0x78", "0x6D", "0x6C"],
491
- mimeType: "application/xml",
492
- extensions: ["xml"],
493
- description: "XML document",
494
- category: "text"
489
+ name: 'xml',
490
+ magicBytes: ['0x3C', '0x3F', '0x78', '0x6D', '0x6C'],
491
+ mimeType: 'application/xml',
492
+ extensions: ['xml'],
493
+ description: 'XML document',
494
+ category: 'text'
495
495
  },
496
496
  {
497
- name: "swf",
498
- magicBytes: ["0x43", "0x57", "0x53"],
499
- mimeType: "application/x-shockwave-flash",
500
- extensions: ["swf"],
501
- description: "Shockwave Flash",
502
- category: "other"
497
+ name: 'swf',
498
+ magicBytes: ['0x43', '0x57', '0x53'],
499
+ mimeType: 'application/x-shockwave-flash',
500
+ extensions: ['swf'],
501
+ description: 'Shockwave Flash',
502
+ category: 'other'
503
503
  },
504
504
  {
505
- name: "swf-compressed",
506
- magicBytes: ["0x46", "0x57", "0x53"],
507
- mimeType: "application/x-shockwave-flash",
508
- extensions: ["swf"],
509
- description: "Shockwave Flash (compressed)",
510
- category: "other"
505
+ name: 'swf-compressed',
506
+ magicBytes: ['0x46', '0x57', '0x53'],
507
+ mimeType: 'application/x-shockwave-flash',
508
+ extensions: ['swf'],
509
+ description: 'Shockwave Flash (compressed)',
510
+ category: 'other'
511
511
  },
512
512
  {
513
- name: "psd",
514
- magicBytes: ["0x38", "0x42", "0x50", "0x53"],
515
- mimeType: "image/vnd.adobe.photoshop",
516
- extensions: ["psd"],
517
- description: "Adobe Photoshop document",
518
- category: "image"
513
+ name: 'psd',
514
+ magicBytes: ['0x38', '0x42', '0x50', '0x53'],
515
+ mimeType: 'image/vnd.adobe.photoshop',
516
+ extensions: ['psd'],
517
+ description: 'Adobe Photoshop document',
518
+ category: 'image'
519
519
  },
520
520
  {
521
- name: "indd",
522
- magicBytes: ["0x06", "0x06", "0xED", "0xF5", "0xD8", "0x1D", "0x46", "0xE5", "0xBD", "0x31", "0xEF", "0xE7", "0xFE", "0x74", "0xB7", "0x1D"],
523
- mimeType: "application/x-indesign",
524
- extensions: ["indd"],
525
- description: "Adobe InDesign document",
526
- category: "document"
521
+ name: 'indd',
522
+ magicBytes: ['0x06', '0x06', '0xED', '0xF5', '0xD8', '0x1D', '0x46', '0xE5', '0xBD', '0x31', '0xEF', '0xE7', '0xFE', '0x74', '0xB7', '0x1D'],
523
+ mimeType: 'application/x-indesign',
524
+ extensions: ['indd'],
525
+ description: 'Adobe InDesign document',
526
+ category: 'document'
527
527
  },
528
528
  // Additional Archive Formats
529
529
  {
530
- name: "cab",
531
- magicBytes: ["0x4D", "0x53", "0x43", "0x46"],
532
- mimeType: "application/vnd.ms-cab-compressed",
533
- extensions: ["cab"],
534
- description: "Microsoft Cabinet archive",
535
- category: "archive",
536
- charset: "binary"
537
- },
538
- {
539
- name: "deb",
540
- magicBytes: ["0x21", "0x3C", "0x61", "0x72", "0x63", "0x68", "0x3E"],
541
- mimeType: "application/x-debian-package",
542
- extensions: ["deb"],
543
- description: "Debian package",
544
- category: "archive",
545
- charset: "binary"
546
- },
547
- {
548
- name: "ar",
549
- magicBytes: ["0x21", "0x3C", "0x61", "0x72", "0x63", "0x68", "0x3E"],
550
- mimeType: "application/x-archive",
551
- extensions: ["ar", "a"],
552
- description: "Unix archive",
553
- category: "archive",
554
- charset: "binary"
555
- },
556
- {
557
- name: "rpm",
558
- magicBytes: ["0xED", "0xAB", "0xEE", "0xDB"],
559
- mimeType: "application/x-rpm",
560
- extensions: ["rpm"],
561
- description: "Red Hat Package Manager",
562
- category: "archive",
563
- charset: "binary"
530
+ name: 'cab',
531
+ magicBytes: ['0x4D', '0x53', '0x43', '0x46'],
532
+ mimeType: 'application/vnd.ms-cab-compressed',
533
+ extensions: ['cab'],
534
+ description: 'Microsoft Cabinet archive',
535
+ category: 'archive',
536
+ charset: 'binary'
537
+ },
538
+ {
539
+ name: 'deb',
540
+ magicBytes: ['0x21', '0x3C', '0x61', '0x72', '0x63', '0x68', '0x3E'],
541
+ mimeType: 'application/x-debian-package',
542
+ extensions: ['deb'],
543
+ description: 'Debian package',
544
+ category: 'archive',
545
+ charset: 'binary'
546
+ },
547
+ {
548
+ name: 'ar',
549
+ magicBytes: ['0x21', '0x3C', '0x61', '0x72', '0x63', '0x68', '0x3E'],
550
+ mimeType: 'application/x-archive',
551
+ extensions: ['ar', 'a'],
552
+ description: 'Unix archive',
553
+ category: 'archive',
554
+ charset: 'binary'
555
+ },
556
+ {
557
+ name: 'rpm',
558
+ magicBytes: ['0xED', '0xAB', '0xEE', '0xDB'],
559
+ mimeType: 'application/x-rpm',
560
+ extensions: ['rpm'],
561
+ description: 'Red Hat Package Manager',
562
+ category: 'archive',
563
+ charset: 'binary'
564
564
  },
565
565
  // Additional Audio Formats
566
566
  {
567
- name: "m4a",
568
- magicBytes: ["0x66", "0x74", "0x79", "0x70", "0x4D", "0x34", "0x41"],
569
- mimeType: "audio/mp4",
570
- extensions: ["m4a"],
567
+ name: 'm4a',
568
+ magicBytes: ['0x66', '0x74', '0x79', '0x70', '0x4D', '0x34', '0x41'],
569
+ mimeType: 'audio/mp4',
570
+ extensions: ['m4a'],
571
571
  offset: 4,
572
- description: "MPEG-4 Audio",
573
- category: "audio",
574
- charset: "binary"
572
+ description: 'MPEG-4 Audio',
573
+ category: 'audio',
574
+ charset: 'binary'
575
575
  },
576
576
  {
577
- name: "opus",
578
- magicBytes: ["0x4F", "0x70", "0x75", "0x73", "0x48", "0x65", "0x61", "0x64"],
579
- mimeType: "audio/opus",
580
- extensions: ["opus"],
581
- description: "Opus audio",
582
- category: "audio",
583
- charset: "binary"
577
+ name: 'opus',
578
+ magicBytes: ['0x4F', '0x70', '0x75', '0x73', '0x48', '0x65', '0x61', '0x64'],
579
+ mimeType: 'audio/opus',
580
+ extensions: ['opus'],
581
+ description: 'Opus audio',
582
+ category: 'audio',
583
+ charset: 'binary'
584
584
  },
585
585
  {
586
- name: "amr",
587
- magicBytes: ["0x23", "0x21", "0x41", "0x4D", "0x52"],
588
- mimeType: "audio/amr",
589
- extensions: ["amr"],
590
- description: "Adaptive Multi-Rate audio",
591
- category: "audio",
592
- charset: "binary"
586
+ name: 'amr',
587
+ magicBytes: ['0x23', '0x21', '0x41', '0x4D', '0x52'],
588
+ mimeType: 'audio/amr',
589
+ extensions: ['amr'],
590
+ description: 'Adaptive Multi-Rate audio',
591
+ category: 'audio',
592
+ charset: 'binary'
593
593
  },
594
594
  {
595
- name: "spx",
596
- magicBytes: ["0x53", "0x70", "0x65", "0x65", "0x78", "0x20", "0x20", "0x20"],
597
- mimeType: "audio/speex",
598
- extensions: ["spx"],
599
- description: "Speex audio",
600
- category: "audio",
601
- charset: "binary"
595
+ name: 'spx',
596
+ magicBytes: ['0x53', '0x70', '0x65', '0x65', '0x78', '0x20', '0x20', '0x20'],
597
+ mimeType: 'audio/speex',
598
+ extensions: ['spx'],
599
+ description: 'Speex audio',
600
+ category: 'audio',
601
+ charset: 'binary'
602
602
  },
603
603
  // Additional Video Formats
604
604
  {
605
- name: "webm",
606
- magicBytes: ["0x1A", "0x45", "0xDF", "0xA3"],
607
- mimeType: "video/webm",
608
- extensions: ["webm"],
609
- description: "WebM video",
610
- category: "video",
611
- charset: "binary"
605
+ name: 'webm',
606
+ magicBytes: ['0x1A', '0x45', '0xDF', '0xA3'],
607
+ mimeType: 'video/webm',
608
+ extensions: ['webm'],
609
+ description: 'WebM video',
610
+ category: 'video',
611
+ charset: 'binary'
612
612
  },
613
613
  {
614
- name: "mp2t",
615
- magicBytes: ["0x47"],
616
- mimeType: "video/mp2t",
617
- extensions: ["ts", "mts", "m2ts"],
618
- description: "MPEG Transport Stream",
619
- category: "video",
620
- charset: "binary"
614
+ name: 'mp2t',
615
+ magicBytes: ['0x47'],
616
+ mimeType: 'video/mp2t',
617
+ extensions: ['ts', 'mts', 'm2ts'],
618
+ description: 'MPEG Transport Stream',
619
+ category: 'video',
620
+ charset: 'binary'
621
621
  },
622
622
  // AutoCAD DWG - Multiple versions with different signatures
623
623
  {
624
- name: "dwg",
625
- magicBytes: ["0x41", "0x43", "0x31", "0x2E", "0x32"], // AC1.2
626
- mimeType: "application/acad",
627
- extensions: ["dwg"],
628
- description: "AutoCAD Drawing (R1.2)",
629
- category: "cad",
630
- charset: "binary"
631
- },
632
- {
633
- name: "dwg",
634
- magicBytes: ["0x41", "0x43", "0x31", "0x2E", "0x34", "0x30"], // AC1.40
635
- mimeType: "application/acad",
636
- extensions: ["dwg"],
637
- description: "AutoCAD Drawing (R1.40)",
638
- category: "cad",
639
- charset: "binary"
640
- },
641
- {
642
- name: "dwg",
643
- magicBytes: ["0x41", "0x43", "0x31", "0x2E", "0x35", "0x30"], // AC1.50
644
- mimeType: "application/acad",
645
- extensions: ["dwg"],
646
- description: "AutoCAD Drawing (R1.50)",
647
- category: "cad",
648
- charset: "binary"
649
- },
650
- {
651
- name: "dwg",
652
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x30", "0x30"], // AC2.00
653
- mimeType: "application/acad",
654
- extensions: ["dwg"],
655
- description: "AutoCAD Drawing (R2.00)",
656
- category: "cad",
657
- charset: "binary"
658
- },
659
- {
660
- name: "dwg",
661
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x31", "0x30"], // AC2.10
662
- mimeType: "application/acad",
663
- extensions: ["dwg"],
664
- description: "AutoCAD Drawing (R2.10)",
665
- category: "cad",
666
- charset: "binary"
667
- },
668
- {
669
- name: "dwg",
670
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x32", "0x31"], // AC2.21
671
- mimeType: "application/acad",
672
- extensions: ["dwg"],
673
- description: "AutoCAD Drawing (R2.21)",
674
- category: "cad",
675
- charset: "binary"
676
- },
677
- {
678
- name: "dwg",
679
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x32", "0x32"], // AC2.22
680
- mimeType: "application/acad",
681
- extensions: ["dwg"],
682
- description: "AutoCAD Drawing (R2.22)",
683
- category: "cad",
684
- charset: "binary"
685
- },
686
- {
687
- name: "dwg",
688
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x35", "0x30"], // AC2.50
689
- mimeType: "application/acad",
690
- extensions: ["dwg"],
691
- description: "AutoCAD Drawing (R2.50)",
692
- category: "cad",
693
- charset: "binary"
694
- },
695
- {
696
- name: "dwg",
697
- magicBytes: ["0x41", "0x43", "0x32", "0x2E", "0x36", "0x30"], // AC2.60
698
- mimeType: "application/acad",
699
- extensions: ["dwg"],
700
- description: "AutoCAD Drawing (R2.60)",
701
- category: "cad",
702
- charset: "binary"
703
- },
704
- {
705
- name: "dwg",
706
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x30", "0x31"], // AC1001
707
- mimeType: "application/acad",
708
- extensions: ["dwg"],
709
- description: "AutoCAD Drawing (R9)",
710
- category: "cad",
711
- charset: "binary"
712
- },
713
- {
714
- name: "dwg",
715
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x30", "0x32"], // AC1002
716
- mimeType: "application/acad",
717
- extensions: ["dwg"],
718
- description: "AutoCAD Drawing (R10)",
719
- category: "cad",
720
- charset: "binary"
721
- },
722
- {
723
- name: "dwg",
724
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x30", "0x33"], // AC1003
725
- mimeType: "application/acad",
726
- extensions: ["dwg"],
727
- description: "AutoCAD Drawing (R11)",
728
- category: "cad",
729
- charset: "binary"
730
- },
731
- {
732
- name: "dwg",
733
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x30", "0x34"], // AC1004
734
- mimeType: "application/acad",
735
- extensions: ["dwg"],
736
- description: "AutoCAD Drawing (R12)",
737
- category: "cad",
738
- charset: "binary"
739
- },
740
- {
741
- name: "dwg",
742
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x31", "0x32"], // AC1012
743
- mimeType: "application/acad",
744
- extensions: ["dwg"],
745
- description: "AutoCAD Drawing (R13)",
746
- category: "cad",
747
- charset: "binary"
748
- },
749
- {
750
- name: "dwg",
751
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x31", "0x34"], // AC1014
752
- mimeType: "application/acad",
753
- extensions: ["dwg"],
754
- description: "AutoCAD Drawing (R14)",
755
- category: "cad",
756
- charset: "binary"
757
- },
758
- {
759
- name: "dwg",
760
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x31", "0x35"], // AC1015
761
- mimeType: "application/acad",
762
- extensions: ["dwg"],
763
- description: "AutoCAD Drawing (2000)",
764
- category: "cad",
765
- charset: "binary"
766
- },
767
- {
768
- name: "dwg",
769
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x31", "0x38"], // AC1018
770
- mimeType: "application/acad",
771
- extensions: ["dwg"],
772
- description: "AutoCAD Drawing (2004)",
773
- category: "cad",
774
- charset: "binary"
775
- },
776
- {
777
- name: "dwg",
778
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x32", "0x31"], // AC1021
779
- mimeType: "application/acad",
780
- extensions: ["dwg"],
781
- description: "AutoCAD Drawing (2007)",
782
- category: "cad",
783
- charset: "binary"
784
- },
785
- {
786
- name: "dwg",
787
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x32", "0x34"], // AC1024
788
- mimeType: "application/acad",
789
- extensions: ["dwg"],
790
- description: "AutoCAD Drawing (2010)",
791
- category: "cad",
792
- charset: "binary"
793
- },
794
- {
795
- name: "dwg",
796
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x32", "0x37"], // AC1027
797
- mimeType: "application/acad",
798
- extensions: ["dwg"],
799
- description: "AutoCAD Drawing (2013)",
800
- category: "cad",
801
- charset: "binary"
802
- },
803
- {
804
- name: "dwg",
805
- magicBytes: ["0x41", "0x43", "0x31", "0x30", "0x33", "0x32"], // AC1032
806
- mimeType: "application/acad",
807
- extensions: ["dwg"],
808
- description: "AutoCAD Drawing (2018)",
809
- category: "cad",
810
- charset: "binary"
624
+ name: 'dwg',
625
+ magicBytes: ['0x41', '0x43', '0x31', '0x2E', '0x32'], // AC1.2
626
+ mimeType: 'application/acad',
627
+ extensions: ['dwg'],
628
+ description: 'AutoCAD Drawing (R1.2)',
629
+ category: 'cad',
630
+ charset: 'binary'
631
+ },
632
+ {
633
+ name: 'dwg',
634
+ magicBytes: ['0x41', '0x43', '0x31', '0x2E', '0x34', '0x30'], // AC1.40
635
+ mimeType: 'application/acad',
636
+ extensions: ['dwg'],
637
+ description: 'AutoCAD Drawing (R1.40)',
638
+ category: 'cad',
639
+ charset: 'binary'
640
+ },
641
+ {
642
+ name: 'dwg',
643
+ magicBytes: ['0x41', '0x43', '0x31', '0x2E', '0x35', '0x30'], // AC1.50
644
+ mimeType: 'application/acad',
645
+ extensions: ['dwg'],
646
+ description: 'AutoCAD Drawing (R1.50)',
647
+ category: 'cad',
648
+ charset: 'binary'
649
+ },
650
+ {
651
+ name: 'dwg',
652
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x30', '0x30'], // AC2.00
653
+ mimeType: 'application/acad',
654
+ extensions: ['dwg'],
655
+ description: 'AutoCAD Drawing (R2.00)',
656
+ category: 'cad',
657
+ charset: 'binary'
658
+ },
659
+ {
660
+ name: 'dwg',
661
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x31', '0x30'], // AC2.10
662
+ mimeType: 'application/acad',
663
+ extensions: ['dwg'],
664
+ description: 'AutoCAD Drawing (R2.10)',
665
+ category: 'cad',
666
+ charset: 'binary'
667
+ },
668
+ {
669
+ name: 'dwg',
670
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x32', '0x31'], // AC2.21
671
+ mimeType: 'application/acad',
672
+ extensions: ['dwg'],
673
+ description: 'AutoCAD Drawing (R2.21)',
674
+ category: 'cad',
675
+ charset: 'binary'
676
+ },
677
+ {
678
+ name: 'dwg',
679
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x32', '0x32'], // AC2.22
680
+ mimeType: 'application/acad',
681
+ extensions: ['dwg'],
682
+ description: 'AutoCAD Drawing (R2.22)',
683
+ category: 'cad',
684
+ charset: 'binary'
685
+ },
686
+ {
687
+ name: 'dwg',
688
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x35', '0x30'], // AC2.50
689
+ mimeType: 'application/acad',
690
+ extensions: ['dwg'],
691
+ description: 'AutoCAD Drawing (R2.50)',
692
+ category: 'cad',
693
+ charset: 'binary'
694
+ },
695
+ {
696
+ name: 'dwg',
697
+ magicBytes: ['0x41', '0x43', '0x32', '0x2E', '0x36', '0x30'], // AC2.60
698
+ mimeType: 'application/acad',
699
+ extensions: ['dwg'],
700
+ description: 'AutoCAD Drawing (R2.60)',
701
+ category: 'cad',
702
+ charset: 'binary'
703
+ },
704
+ {
705
+ name: 'dwg',
706
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x30', '0x31'], // AC1001
707
+ mimeType: 'application/acad',
708
+ extensions: ['dwg'],
709
+ description: 'AutoCAD Drawing (R9)',
710
+ category: 'cad',
711
+ charset: 'binary'
712
+ },
713
+ {
714
+ name: 'dwg',
715
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x30', '0x32'], // AC1002
716
+ mimeType: 'application/acad',
717
+ extensions: ['dwg'],
718
+ description: 'AutoCAD Drawing (R10)',
719
+ category: 'cad',
720
+ charset: 'binary'
721
+ },
722
+ {
723
+ name: 'dwg',
724
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x30', '0x33'], // AC1003
725
+ mimeType: 'application/acad',
726
+ extensions: ['dwg'],
727
+ description: 'AutoCAD Drawing (R11)',
728
+ category: 'cad',
729
+ charset: 'binary'
730
+ },
731
+ {
732
+ name: 'dwg',
733
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x30', '0x34'], // AC1004
734
+ mimeType: 'application/acad',
735
+ extensions: ['dwg'],
736
+ description: 'AutoCAD Drawing (R12)',
737
+ category: 'cad',
738
+ charset: 'binary'
739
+ },
740
+ {
741
+ name: 'dwg',
742
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x31', '0x32'], // AC1012
743
+ mimeType: 'application/acad',
744
+ extensions: ['dwg'],
745
+ description: 'AutoCAD Drawing (R13)',
746
+ category: 'cad',
747
+ charset: 'binary'
748
+ },
749
+ {
750
+ name: 'dwg',
751
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x31', '0x34'], // AC1014
752
+ mimeType: 'application/acad',
753
+ extensions: ['dwg'],
754
+ description: 'AutoCAD Drawing (R14)',
755
+ category: 'cad',
756
+ charset: 'binary'
757
+ },
758
+ {
759
+ name: 'dwg',
760
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x31', '0x35'], // AC1015
761
+ mimeType: 'application/acad',
762
+ extensions: ['dwg'],
763
+ description: 'AutoCAD Drawing (2000)',
764
+ category: 'cad',
765
+ charset: 'binary'
766
+ },
767
+ {
768
+ name: 'dwg',
769
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x31', '0x38'], // AC1018
770
+ mimeType: 'application/acad',
771
+ extensions: ['dwg'],
772
+ description: 'AutoCAD Drawing (2004)',
773
+ category: 'cad',
774
+ charset: 'binary'
775
+ },
776
+ {
777
+ name: 'dwg',
778
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x32', '0x31'], // AC1021
779
+ mimeType: 'application/acad',
780
+ extensions: ['dwg'],
781
+ description: 'AutoCAD Drawing (2007)',
782
+ category: 'cad',
783
+ charset: 'binary'
784
+ },
785
+ {
786
+ name: 'dwg',
787
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x32', '0x34'], // AC1024
788
+ mimeType: 'application/acad',
789
+ extensions: ['dwg'],
790
+ description: 'AutoCAD Drawing (2010)',
791
+ category: 'cad',
792
+ charset: 'binary'
793
+ },
794
+ {
795
+ name: 'dwg',
796
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x32', '0x37'], // AC1027
797
+ mimeType: 'application/acad',
798
+ extensions: ['dwg'],
799
+ description: 'AutoCAD Drawing (2013)',
800
+ category: 'cad',
801
+ charset: 'binary'
802
+ },
803
+ {
804
+ name: 'dwg',
805
+ magicBytes: ['0x41', '0x43', '0x31', '0x30', '0x33', '0x32'], // AC1032
806
+ mimeType: 'application/acad',
807
+ extensions: ['dwg'],
808
+ description: 'AutoCAD Drawing (2018)',
809
+ category: 'cad',
810
+ charset: 'binary'
811
811
  },
812
812
  // Enhanced Metafile (EMF)
813
813
  {
814
- name: "emf",
815
- magicBytes: ["0x01", "0x00", "0x00", "0x00"],
816
- mimeType: "image/emf",
817
- extensions: ["emf"],
818
- description: "Enhanced Metafile",
819
- category: "image",
820
- charset: "binary"
821
- },
822
- {
823
- name: "mpg",
824
- magicBytes: ["0x00", "0x00", "0x01", "0xBA"],
825
- mimeType: "video/mpeg",
826
- extensions: ["mpg", "mpeg"],
827
- description: "MPEG video",
828
- category: "video",
829
- charset: "binary"
830
- },
831
- {
832
- name: "mp2",
833
- magicBytes: ["0x00", "0x00", "0x01", "0xB3"],
834
- mimeType: "video/mpeg",
835
- extensions: ["mp2", "m2v"],
836
- description: "MPEG-2 video",
837
- category: "video",
838
- charset: "binary"
839
- },
840
- {
841
- name: "flv",
842
- magicBytes: ["0x46", "0x4C", "0x56"],
843
- mimeType: "video/x-flv",
844
- extensions: ["flv"],
845
- description: "Flash Video",
846
- category: "video",
847
- charset: "binary"
814
+ name: 'emf',
815
+ magicBytes: ['0x01', '0x00', '0x00', '0x00'],
816
+ mimeType: 'image/emf',
817
+ extensions: ['emf'],
818
+ description: 'Enhanced Metafile',
819
+ category: 'image',
820
+ charset: 'binary'
821
+ },
822
+ {
823
+ name: 'mpg',
824
+ magicBytes: ['0x00', '0x00', '0x01', '0xBA'],
825
+ mimeType: 'video/mpeg',
826
+ extensions: ['mpg', 'mpeg'],
827
+ description: 'MPEG video',
828
+ category: 'video',
829
+ charset: 'binary'
830
+ },
831
+ {
832
+ name: 'mp2',
833
+ magicBytes: ['0x00', '0x00', '0x01', '0xB3'],
834
+ mimeType: 'video/mpeg',
835
+ extensions: ['mp2', 'm2v'],
836
+ description: 'MPEG-2 video',
837
+ category: 'video',
838
+ charset: 'binary'
839
+ },
840
+ {
841
+ name: 'flv',
842
+ magicBytes: ['0x46', '0x4C', '0x56'],
843
+ mimeType: 'video/x-flv',
844
+ extensions: ['flv'],
845
+ description: 'Flash Video',
846
+ category: 'video',
847
+ charset: 'binary'
848
848
  },
849
849
  // Additional Font Formats
850
850
  {
851
- name: "ttc",
852
- magicBytes: ["0x74", "0x74", "0x63", "0x66"],
853
- mimeType: "font/collection",
854
- extensions: ["ttc"],
855
- description: "TrueType font collection",
856
- category: "font",
857
- charset: "binary"
851
+ name: 'ttc',
852
+ magicBytes: ['0x74', '0x74', '0x63', '0x66'],
853
+ mimeType: 'font/collection',
854
+ extensions: ['ttc'],
855
+ description: 'TrueType font collection',
856
+ category: 'font',
857
+ charset: 'binary'
858
858
  },
859
859
  // Office Document Formats (ZIP-based)
860
860
  {
861
- name: "docx",
862
- magicBytes: ["0x50", "0x4B", "0x03", "0x04"],
863
- mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
864
- extensions: ["docx"],
865
- description: "Microsoft Word document",
866
- category: "document",
867
- charset: "binary",
868
- contentType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
869
- },
870
- {
871
- name: "xlsx",
872
- magicBytes: ["0x50", "0x4B", "0x03", "0x04"],
873
- mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
874
- extensions: ["xlsx"],
875
- description: "Microsoft Excel spreadsheet",
876
- category: "document",
877
- charset: "binary",
878
- contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
879
- },
880
- {
881
- name: "pptx",
882
- magicBytes: ["0x50", "0x4B", "0x03", "0x04"],
883
- mimeType: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
884
- extensions: ["pptx"],
885
- description: "Microsoft PowerPoint presentation",
886
- category: "document",
887
- charset: "binary",
888
- contentType: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
861
+ name: 'docx',
862
+ magicBytes: ['0x50', '0x4B', '0x03', '0x04'],
863
+ mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
864
+ extensions: ['docx'],
865
+ description: 'Microsoft Word document',
866
+ category: 'document',
867
+ charset: 'binary',
868
+ contentType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
869
+ },
870
+ {
871
+ name: 'xlsx',
872
+ magicBytes: ['0x50', '0x4B', '0x03', '0x04'],
873
+ mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
874
+ extensions: ['xlsx'],
875
+ description: 'Microsoft Excel spreadsheet',
876
+ category: 'document',
877
+ charset: 'binary',
878
+ contentType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
879
+ },
880
+ {
881
+ name: 'pptx',
882
+ magicBytes: ['0x50', '0x4B', '0x03', '0x04'],
883
+ mimeType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
884
+ extensions: ['pptx'],
885
+ description: 'Microsoft PowerPoint presentation',
886
+ category: 'document',
887
+ charset: 'binary',
888
+ contentType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
889
889
  }
890
890
  ];
891
891
  exports.CONTENT_TYPE_MAPPINGS = [
@@ -1099,7 +1099,7 @@ exports.CONTENT_TYPE_MAPPINGS = [
1099
1099
  [['md'], 'text/markdown', 'utf-8'],
1100
1100
  [['scss'], 'text/x-scss', 'utf-8'],
1101
1101
  [['sh'], 'application/x-sh', 'utf-8'],
1102
- [['sql'], 'application/sql', 'utf-8'],
1102
+ [['sql'], 'application/x-sql', 'utf-8'],
1103
1103
  [['yaml'], 'application/x-yaml', 'utf-8'],
1104
1104
  [['yml'], 'application/x-yaml', 'utf-8'],
1105
1105
  [['jsx'], 'text/jsx', 'utf-8'],