mimemagic 0.1.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mimemagic might be problematic. Click here for more details.

data/README ADDED
@@ -0,0 +1,15 @@
1
+ MimeMagic is a library to detect the mime type of a file by extension or by content.
2
+
3
+ Usage
4
+ =====
5
+
6
+ require 'mimemagic'
7
+ MimeMagic.by_extension('html').text?
8
+ MimeMagic.by_extension('.html').child_of? 'text/plain'
9
+ MimeMagic.by_magic(File.open('test.html'))
10
+ etc...
11
+
12
+ Authors
13
+ =======
14
+
15
+ Daniel Mendler
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'hoe'
2
+
3
+ $:.unshift 'lib'
4
+ require 'mimemagic'
5
+
6
+ Hoe.spec 'mimemagic' do
7
+ version = MimeMagic::VERSION
8
+ developer 'Daniel Mendler', 'mail@daniel-mendler.de'
9
+ summary = 'Mime detection by extension or content'
10
+ end
data/lib/mimemagic.rb ADDED
@@ -0,0 +1,116 @@
1
+ require 'mimemagic_tables'
2
+ require 'stringio'
3
+
4
+ # Mime type detection
5
+ class MimeMagic
6
+ VERSION = '0.1.4'
7
+
8
+ attr_reader :type, :mediatype, :subtype
9
+
10
+ # Mime type by type string
11
+ def initialize(type)
12
+ @type = type
13
+ @mediatype = @type.split('/')[0]
14
+ @subtype = @type.split('/')[1]
15
+ end
16
+
17
+ # Add custom mime type. Arguments:
18
+ # * <i>type</i>: Mime type
19
+ # * <i>options</i>: Options hash
20
+ #
21
+ # Option keys:
22
+ # * <i>:extensions</i>: String list or single string of file extensions
23
+ # * <i>:parents</i>: String list or single string of parent mime types
24
+ # * <i>:magic</i>: Mime magic specification
25
+ # * <i>:comment</i>: Comment string
26
+ def self.add(type, options)
27
+ extensions = [options[:extensions]].flatten.compact
28
+ TYPES[type] = [extensions,
29
+ [options[:parents]].flatten.compact,
30
+ options[:comment]]
31
+ extensions.each {|ext| EXTENSIONS[ext] = type }
32
+ MAGIC.unshift [type, options[:magic]] if options[:magic]
33
+ end
34
+
35
+ # Returns true if type is a text format
36
+ def text?
37
+ child_of? 'text/plain'
38
+ end
39
+
40
+ # Returns true if type is image
41
+ def image?
42
+ mediatype == 'image'
43
+ end
44
+
45
+ # Mediatype shortcuts
46
+ def image?; mediatype == 'image'; end
47
+ def audio?; mediatype == 'audio'; end
48
+ def video?; mediatype == 'video'; end
49
+
50
+ # Returns true if type is child of parent type
51
+ def child_of?(parent)
52
+ child?(type, parent)
53
+ end
54
+
55
+ # Get string list of file extensions
56
+ def extensions
57
+ TYPES.key?(type) ? TYPES[type][0] : []
58
+ end
59
+
60
+ # Get mime comment
61
+ def comment
62
+ (TYPES.key?(type) ? TYPES[type][2] : nil).to_s
63
+ end
64
+
65
+ # Lookup mime type by file extension
66
+ def self.by_extension(ext)
67
+ ext = ext.to_s.downcase
68
+ mime = EXTENSIONS[ext] || (ext[0..0] == '.' && EXTENSIONS[ext[1..-1]])
69
+ mime ? new(mime) : nil
70
+ end
71
+
72
+ # Lookup mime type by magic content analysis.
73
+ # This is a slow operation.
74
+ def self.by_magic(io)
75
+ if !(io.respond_to?(:seek) && io.respond_to?(:read))
76
+ io = io.to_s
77
+ io.force_encoding('ascii-8bit') if io.respond_to?(:force_encoding)
78
+ io = StringIO.new(io, 'rb')
79
+ end
80
+ mime = MAGIC.find {|type, matches| magic_match(io, matches) }
81
+ mime ? new(mime[0]) : nil
82
+ end
83
+
84
+ # Return type as string
85
+ def to_s
86
+ type
87
+ end
88
+
89
+ # Allow comparison with string
90
+ def ==(x)
91
+ type == x.to_s
92
+ end
93
+
94
+ private
95
+
96
+ def child?(child, parent)
97
+ child == parent || TYPES.key?(child) && TYPES[child][1].any? {|p| child?(p, parent) }
98
+ end
99
+
100
+ def self.magic_match(io, matches)
101
+ matches.any? do |offset, value, children|
102
+ match = if Range === offset
103
+ io.seek(offset.begin)
104
+ io.read(offset.end - offset.begin + value.length).include?(value)
105
+ else
106
+ io.seek(offset)
107
+ value == io.read(value.length)
108
+ end
109
+ match && (!children || magic_match(io, children))
110
+ end
111
+ rescue
112
+ false
113
+ end
114
+
115
+ private_class_method :magic_match
116
+ end
@@ -0,0 +1,1530 @@
1
+ # Generated from freedesktop.org.xml
2
+ class MimeMagic
3
+ private
4
+ EXTENSIONS = {
5
+ '123' => 'application/vnd.lotus-1-2-3',
6
+ '3ds' => 'image/x-3ds',
7
+ '3g2' => 'video/3gpp',
8
+ '3ga' => 'video/3gpp',
9
+ '3gp' => 'video/3gpp',
10
+ '3gpp' => 'video/3gpp',
11
+ '602' => 'application/x-t602',
12
+ '669' => 'audio/x-mod',
13
+ '7z' => 'application/x-7z-compressed',
14
+ 'a' => 'application/x-archive',
15
+ 'aac' => 'audio/mp4',
16
+ 'abw' => 'application/x-abiword',
17
+ 'abw.crashed' => 'application/x-abiword',
18
+ 'abw.gz' => 'application/x-abiword',
19
+ 'ac3' => 'audio/ac3',
20
+ 'ace' => 'application/x-ace',
21
+ 'adb' => 'text/x-adasrc',
22
+ 'ads' => 'text/x-adasrc',
23
+ 'afm' => 'application/x-font-afm',
24
+ 'ag' => 'image/x-applix-graphics',
25
+ 'ai' => 'application/illustrator',
26
+ 'aif' => 'audio/x-aiff',
27
+ 'aifc' => 'audio/x-aiff',
28
+ 'aiff' => 'audio/x-aiff',
29
+ 'al' => 'application/x-perl',
30
+ 'alz' => 'application/x-alz',
31
+ 'amr' => 'audio/AMR',
32
+ 'ani' => 'application/x-navi-animation',
33
+ 'anx' => 'application/annodex',
34
+ 'ape' => 'audio/x-ape',
35
+ 'arj' => 'application/x-arj',
36
+ 'arw' => 'image/x-sony-arw',
37
+ 'as' => 'application/x-applix-spreadsheet',
38
+ 'asc' => 'application/pgp-encrypted',
39
+ 'asf' => 'video/x-ms-asf',
40
+ 'asp' => 'application/x-asp',
41
+ 'ass' => 'text/x-ssa',
42
+ 'asx' => 'audio/x-ms-asx',
43
+ 'atom' => 'application/atom+xml',
44
+ 'au' => 'audio/basic',
45
+ 'avi' => 'video/x-msvideo',
46
+ 'aw' => 'application/x-applix-word',
47
+ 'awb' => 'audio/AMR-WB',
48
+ 'awk' => 'application/x-awk',
49
+ 'axa' => 'audio/annodex',
50
+ 'axv' => 'video/annodex',
51
+ 'bak' => 'application/x-trash',
52
+ 'bcpio' => 'application/x-bcpio',
53
+ 'bdf' => 'application/x-font-bdf',
54
+ 'bib' => 'text/x-bibtex',
55
+ 'bin' => 'application/octet-stream',
56
+ 'blend' => 'application/x-blender',
57
+ 'blender' => 'application/x-blender',
58
+ 'bmp' => 'image/bmp',
59
+ 'bz' => 'application/x-bzip',
60
+ 'bz2' => 'application/x-bzip',
61
+ 'c' => 'text/x-c++src',
62
+ 'c++' => 'text/x-c++src',
63
+ 'cab' => 'application/vnd.ms-cab-compressed',
64
+ 'cb7' => 'application/x-cb7',
65
+ 'cbr' => 'application/x-cbr',
66
+ 'cbt' => 'application/x-cbt',
67
+ 'cbz' => 'application/x-cbz',
68
+ 'cc' => 'text/x-c++src',
69
+ 'cdf' => 'application/x-netcdf',
70
+ 'cdr' => 'application/vnd.corel-draw',
71
+ 'cer' => 'application/pkix-cert',
72
+ 'cert' => 'application/x-x509-ca-cert',
73
+ 'cgm' => 'image/cgm',
74
+ 'chm' => 'application/x-chm',
75
+ 'chrt' => 'application/x-kchart',
76
+ 'class' => 'application/x-java',
77
+ 'cls' => 'text/x-tex',
78
+ 'cmake' => 'text/x-cmake',
79
+ 'cpio' => 'application/x-cpio',
80
+ 'cpio.gz' => 'application/x-cpio-compressed',
81
+ 'cpp' => 'text/x-c++src',
82
+ 'cr2' => 'image/x-canon-cr2',
83
+ 'crl' => 'application/pkix-crl',
84
+ 'crt' => 'application/x-x509-ca-cert',
85
+ 'crw' => 'image/x-canon-crw',
86
+ 'cs' => 'text/x-csharp',
87
+ 'csh' => 'application/x-csh',
88
+ 'css' => 'text/css',
89
+ 'cssl' => 'text/css',
90
+ 'csv' => 'text/csv',
91
+ 'cue' => 'application/x-cue',
92
+ 'cur' => 'image/x-win-bitmap',
93
+ 'cxx' => 'text/x-c++src',
94
+ 'd' => 'text/x-dsrc',
95
+ 'dar' => 'application/x-dar',
96
+ 'dbf' => 'application/x-dbf',
97
+ 'dc' => 'application/x-dc-rom',
98
+ 'dcl' => 'text/x-dcl',
99
+ 'dcm' => 'application/dicom',
100
+ 'dcr' => 'image/x-kodak-dcr',
101
+ 'dds' => 'image/x-dds',
102
+ 'deb' => 'application/x-deb',
103
+ 'der' => 'application/x-x509-ca-cert',
104
+ 'desktop' => 'application/x-desktop',
105
+ 'dia' => 'application/x-dia-diagram',
106
+ 'diff' => 'text/x-patch',
107
+ 'divx' => 'video/x-msvideo',
108
+ 'djv' => 'image/vnd.djvu',
109
+ 'djvu' => 'image/vnd.djvu',
110
+ 'dng' => 'image/x-adobe-dng',
111
+ 'doc' => 'application/msword',
112
+ 'docbook' => 'application/docbook+xml',
113
+ 'docm' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
114
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
115
+ 'dot' => 'application/msword-template',
116
+ 'dsl' => 'text/x-dsl',
117
+ 'dtd' => 'application/xml-dtd',
118
+ 'dtx' => 'text/x-tex',
119
+ 'dv' => 'video/dv',
120
+ 'dvi' => 'application/x-dvi',
121
+ 'dvi.bz2' => 'application/x-bzdvi',
122
+ 'dvi.gz' => 'application/x-gzdvi',
123
+ 'dwg' => 'image/vnd.dwg',
124
+ 'dxf' => 'image/vnd.dxf',
125
+ 'e' => 'text/x-eiffel',
126
+ 'egon' => 'application/x-egon',
127
+ 'eif' => 'text/x-eiffel',
128
+ 'el' => 'text/x-emacs-lisp',
129
+ 'emf' => 'image/x-emf',
130
+ 'eml' => 'message/rfc822',
131
+ 'emp' => 'application/vnd.emusic-emusic_package',
132
+ 'ent' => 'application/xml-external-parsed-entity',
133
+ 'eps' => 'image/x-eps',
134
+ 'eps.bz2' => 'image/x-bzeps',
135
+ 'eps.gz' => 'image/x-gzeps',
136
+ 'epsf' => 'image/x-eps',
137
+ 'epsf.bz2' => 'image/x-bzeps',
138
+ 'epsf.gz' => 'image/x-gzeps',
139
+ 'epsi' => 'image/x-eps',
140
+ 'epsi.bz2' => 'image/x-bzeps',
141
+ 'epsi.gz' => 'image/x-gzeps',
142
+ 'epub' => 'application/epub+zip',
143
+ 'erl' => 'text/x-erlang',
144
+ 'es' => 'application/ecmascript',
145
+ 'etheme' => 'application/x-e-theme',
146
+ 'etx' => 'text/x-setext',
147
+ 'exe' => 'application/x-ms-dos-executable',
148
+ 'exr' => 'image/x-exr',
149
+ 'ez' => 'application/andrew-inset',
150
+ 'f' => 'text/x-fortran',
151
+ 'f90' => 'text/x-fortran',
152
+ 'f95' => 'text/x-fortran',
153
+ 'fb2' => 'application/x-fictionbook+xml',
154
+ 'fig' => 'image/x-xfig',
155
+ 'fits' => 'image/fits',
156
+ 'fl' => 'application/x-fluid',
157
+ 'flac' => 'audio/x-flac',
158
+ 'flc' => 'video/x-flic',
159
+ 'fli' => 'video/x-flic',
160
+ 'flv' => 'video/x-flv',
161
+ 'flw' => 'application/x-kivio',
162
+ 'fo' => 'text/x-xslfo',
163
+ 'fodg' => 'application/vnd.oasis.opendocument.graphics-flat-xml',
164
+ 'fodp' => 'application/vnd.oasis.opendocument.presentation-flat-xml',
165
+ 'fods' => 'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
166
+ 'fodt' => 'application/vnd.oasis.opendocument.text-flat-xml',
167
+ 'for' => 'text/x-fortran',
168
+ 'g3' => 'image/fax-g3',
169
+ 'gb' => 'application/x-gameboy-rom',
170
+ 'gba' => 'application/x-gba-rom',
171
+ 'gcrd' => 'text/directory',
172
+ 'ged' => 'application/x-gedcom',
173
+ 'gedcom' => 'application/x-gedcom',
174
+ 'gen' => 'application/x-genesis-rom',
175
+ 'gf' => 'application/x-tex-gf',
176
+ 'gg' => 'application/x-sms-rom',
177
+ 'gif' => 'image/gif',
178
+ 'glade' => 'application/x-glade',
179
+ 'gmo' => 'application/x-gettext-translation',
180
+ 'gnc' => 'application/x-gnucash',
181
+ 'gnd' => 'application/gnunet-directory',
182
+ 'gnucash' => 'application/x-gnucash',
183
+ 'gnumeric' => 'application/x-gnumeric',
184
+ 'gnuplot' => 'application/x-gnuplot',
185
+ 'gp' => 'application/x-gnuplot',
186
+ 'gpg' => 'application/pgp-encrypted',
187
+ 'gplt' => 'application/x-gnuplot',
188
+ 'gra' => 'application/x-graphite',
189
+ 'gsf' => 'application/x-font-type1',
190
+ 'gsm' => 'audio/x-gsm',
191
+ 'gtar' => 'application/x-tar',
192
+ 'gv' => 'text/vnd.graphviz',
193
+ 'gvp' => 'text/x-google-video-pointer',
194
+ 'gz' => 'application/x-gzip',
195
+ 'h' => 'text/x-chdr',
196
+ 'h++' => 'text/x-c++hdr',
197
+ 'hdf' => 'application/x-hdf',
198
+ 'hh' => 'text/x-c++hdr',
199
+ 'hp' => 'text/x-c++hdr',
200
+ 'hpgl' => 'application/vnd.hp-hpgl',
201
+ 'hpp' => 'text/x-c++hdr',
202
+ 'hs' => 'text/x-haskell',
203
+ 'htm' => 'text/html',
204
+ 'html' => 'text/html',
205
+ 'hwp' => 'application/x-hwp',
206
+ 'hwt' => 'application/x-hwt',
207
+ 'hxx' => 'text/x-c++hdr',
208
+ 'ica' => 'application/x-ica',
209
+ 'icb' => 'image/x-tga',
210
+ 'icc' => 'application/vnd.iccprofile',
211
+ 'icm' => 'application/vnd.iccprofile',
212
+ 'icns' => 'image/x-icns',
213
+ 'ico' => 'image/vnd.microsoft.icon',
214
+ 'ics' => 'text/calendar',
215
+ 'idl' => 'text/x-idl',
216
+ 'ief' => 'image/ief',
217
+ 'iff' => 'image/x-iff',
218
+ 'ilbm' => 'image/x-ilbm',
219
+ 'ime' => 'text/x-iMelody',
220
+ 'imy' => 'text/x-iMelody',
221
+ 'ins' => 'text/x-tex',
222
+ 'iptables' => 'text/x-iptables',
223
+ 'iso' => 'application/x-cd-image',
224
+ 'iso9660' => 'application/x-cd-image',
225
+ 'it' => 'audio/x-it',
226
+ 'it87' => 'application/x-it87',
227
+ 'j2k' => 'image/jp2',
228
+ 'jad' => 'text/vnd.sun.j2me.app-descriptor',
229
+ 'jar' => 'application/x-java-archive',
230
+ 'java' => 'text/x-java',
231
+ 'jceks' => 'application/x-java-jce-keystore',
232
+ 'jks' => 'application/x-java-keystore',
233
+ 'jng' => 'image/x-jng',
234
+ 'jnlp' => 'application/x-java-jnlp-file',
235
+ 'jp2' => 'image/jp2',
236
+ 'jpc' => 'image/jp2',
237
+ 'jpe' => 'image/jpeg',
238
+ 'jpeg' => 'image/jpeg',
239
+ 'jpf' => 'image/jp2',
240
+ 'jpg' => 'image/jpeg',
241
+ 'jpr' => 'application/x-jbuilder-project',
242
+ 'jpx' => 'application/x-jbuilder-project',
243
+ 'js' => 'application/javascript',
244
+ 'k25' => 'image/x-kodak-k25',
245
+ 'kar' => 'audio/midi',
246
+ 'karbon' => 'application/x-karbon',
247
+ 'kdc' => 'image/x-kodak-kdc',
248
+ 'kdelnk' => 'application/x-desktop',
249
+ 'kexi' => 'application/x-kexiproject-sqlite2',
250
+ 'kexic' => 'application/x-kexi-connectiondata',
251
+ 'kexis' => 'application/x-kexiproject-shortcut',
252
+ 'kfo' => 'application/x-kformula',
253
+ 'kil' => 'application/x-killustrator',
254
+ 'kino' => 'application/smil',
255
+ 'kml' => 'application/vnd.google-earth.kml+xml',
256
+ 'kmz' => 'application/vnd.google-earth.kmz',
257
+ 'kon' => 'application/x-kontour',
258
+ 'kpm' => 'application/x-kpovmodeler',
259
+ 'kpr' => 'application/x-kpresenter',
260
+ 'kpt' => 'application/x-kpresenter',
261
+ 'kra' => 'application/x-krita',
262
+ 'ks' => 'application/x-java-keystore',
263
+ 'ksp' => 'application/x-kspread',
264
+ 'kud' => 'application/x-kugar',
265
+ 'kwd' => 'application/x-kword',
266
+ 'kwt' => 'application/x-kword',
267
+ 'la' => 'application/x-shared-library-la',
268
+ 'latex' => 'text/x-tex',
269
+ 'ldif' => 'text/x-ldif',
270
+ 'lha' => 'application/x-lha',
271
+ 'lhs' => 'text/x-literate-haskell',
272
+ 'lhz' => 'application/x-lhz',
273
+ 'log' => 'text/x-log',
274
+ 'ltx' => 'text/x-tex',
275
+ 'lua' => 'text/x-lua',
276
+ 'lwo' => 'image/x-lwo',
277
+ 'lwob' => 'image/x-lwo',
278
+ 'lws' => 'image/x-lws',
279
+ 'ly' => 'text/x-lilypond',
280
+ 'lyx' => 'application/x-lyx',
281
+ 'lz' => 'application/x-lzip',
282
+ 'lzh' => 'application/x-lha',
283
+ 'lzma' => 'application/x-lzma',
284
+ 'lzo' => 'application/x-lzop',
285
+ 'm' => 'text/x-objcsrc',
286
+ 'm15' => 'audio/x-mod',
287
+ 'm2t' => 'video/mpeg',
288
+ 'm3u' => 'audio/x-mpegurl',
289
+ 'm3u8' => 'audio/x-mpegurl',
290
+ 'm4' => 'application/x-m4',
291
+ 'm4a' => 'audio/mp4',
292
+ 'm4b' => 'audio/x-m4b',
293
+ 'm4v' => 'video/mp4',
294
+ 'mab' => 'application/x-markaby',
295
+ 'man' => 'application/x-troff-man',
296
+ 'mbox' => 'application/mbox',
297
+ 'md' => 'application/x-genesis-rom',
298
+ 'mdb' => 'application/vnd.ms-access',
299
+ 'mdi' => 'image/vnd.ms-modi',
300
+ 'me' => 'text/x-troff-me',
301
+ 'med' => 'audio/x-mod',
302
+ 'metalink' => 'application/metalink+xml',
303
+ 'mgp' => 'application/x-magicpoint',
304
+ 'mid' => 'audio/midi',
305
+ 'midi' => 'audio/midi',
306
+ 'mif' => 'application/x-mif',
307
+ 'minipsf' => 'audio/x-minipsf',
308
+ 'mka' => 'audio/x-matroska',
309
+ 'mkv' => 'video/x-matroska',
310
+ 'ml' => 'text/x-ocaml',
311
+ 'mli' => 'text/x-ocaml',
312
+ 'mm' => 'text/x-troff-mm',
313
+ 'mmf' => 'application/x-smaf',
314
+ 'mml' => 'application/mathml+xml',
315
+ 'mng' => 'video/x-mng',
316
+ 'mo' => 'application/x-gettext-translation',
317
+ 'mo3' => 'audio/x-mo3',
318
+ 'moc' => 'text/x-moc',
319
+ 'mod' => 'audio/x-mod',
320
+ 'mof' => 'text/x-mof',
321
+ 'moov' => 'video/quicktime',
322
+ 'mov' => 'video/quicktime',
323
+ 'movie' => 'video/x-sgi-movie',
324
+ 'mp+' => 'audio/x-musepack',
325
+ 'mp2' => 'audio/mp2',
326
+ 'mp3' => 'audio/mpeg',
327
+ 'mp4' => 'video/mp4',
328
+ 'mpc' => 'audio/x-musepack',
329
+ 'mpe' => 'video/mpeg',
330
+ 'mpeg' => 'video/mpeg',
331
+ 'mpg' => 'video/mpeg',
332
+ 'mpga' => 'audio/mpeg',
333
+ 'mpp' => 'audio/x-musepack',
334
+ 'mrl' => 'text/x-mrml',
335
+ 'mrml' => 'text/x-mrml',
336
+ 'mrw' => 'image/x-minolta-mrw',
337
+ 'ms' => 'text/x-troff-ms',
338
+ 'msi' => 'application/x-msi',
339
+ 'msod' => 'image/x-msod',
340
+ 'msx' => 'application/x-msx-rom',
341
+ 'mtm' => 'audio/x-mod',
342
+ 'mup' => 'text/x-mup',
343
+ 'mxf' => 'application/mxf',
344
+ 'n64' => 'application/x-n64-rom',
345
+ 'nb' => 'application/mathematica',
346
+ 'nc' => 'application/x-netcdf',
347
+ 'nds' => 'application/x-nintendo-ds-rom',
348
+ 'nef' => 'image/x-nikon-nef',
349
+ 'nes' => 'application/x-nes-rom',
350
+ 'nfo' => 'text/x-nfo',
351
+ 'not' => 'text/x-mup',
352
+ 'nsc' => 'application/x-netshow-channel',
353
+ 'nsv' => 'video/x-nsv',
354
+ 'o' => 'application/x-object',
355
+ 'obj' => 'application/x-tgif',
356
+ 'ocl' => 'text/x-ocl',
357
+ 'oda' => 'application/oda',
358
+ 'odb' => 'application/vnd.oasis.opendocument.database',
359
+ 'odc' => 'application/vnd.oasis.opendocument.chart',
360
+ 'odf' => 'application/vnd.oasis.opendocument.formula',
361
+ 'odg' => 'application/vnd.oasis.opendocument.graphics',
362
+ 'odi' => 'application/vnd.oasis.opendocument.image',
363
+ 'odm' => 'application/vnd.oasis.opendocument.text-master',
364
+ 'odp' => 'application/vnd.oasis.opendocument.presentation',
365
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
366
+ 'odt' => 'application/vnd.oasis.opendocument.text',
367
+ 'oga' => 'audio/ogg',
368
+ 'ogg' => 'audio/ogg',
369
+ 'ogm' => 'video/x-ogm+ogg',
370
+ 'ogv' => 'video/ogg',
371
+ 'ogx' => 'application/ogg',
372
+ 'old' => 'application/x-trash',
373
+ 'oleo' => 'application/x-oleo',
374
+ 'opml' => 'text/x-opml+xml',
375
+ 'ora' => 'image/openraster',
376
+ 'orf' => 'image/x-olympus-orf',
377
+ 'otc' => 'application/vnd.oasis.opendocument.chart-template',
378
+ 'otf' => 'application/vnd.oasis.opendocument.formula-template',
379
+ 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
380
+ 'oth' => 'application/vnd.oasis.opendocument.text-web',
381
+ 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
382
+ 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
383
+ 'ott' => 'application/vnd.oasis.opendocument.text-template',
384
+ 'owl' => 'application/rdf+xml',
385
+ 'oxt' => 'application/vnd.openofficeorg.extension',
386
+ 'p' => 'text/x-pascal',
387
+ 'p10' => 'application/pkcs10',
388
+ 'p12' => 'application/x-pkcs12',
389
+ 'p7b' => 'application/x-pkcs7-certificates',
390
+ 'p7s' => 'application/pkcs7-signature',
391
+ 'pack' => 'application/x-java-pack200',
392
+ 'pak' => 'application/x-pak',
393
+ 'par2' => 'application/x-par2',
394
+ 'pas' => 'text/x-pascal',
395
+ 'patch' => 'text/x-patch',
396
+ 'pbm' => 'image/x-portable-bitmap',
397
+ 'pcd' => 'image/x-photo-cd',
398
+ 'pcf' => 'application/x-font-pcf',
399
+ 'pcf.gz' => 'application/x-font-pcf',
400
+ 'pcf.z' => 'application/x-font-pcf',
401
+ 'pcl' => 'application/vnd.hp-pcl',
402
+ 'pcx' => 'image/x-pcx',
403
+ 'pdb' => 'application/x-aportisdoc',
404
+ 'pdc' => 'application/x-aportisdoc',
405
+ 'pdf' => 'application/pdf',
406
+ 'pdf.bz2' => 'application/x-bzpdf',
407
+ 'pdf.gz' => 'application/x-gzpdf',
408
+ 'pef' => 'image/x-pentax-pef',
409
+ 'pem' => 'application/x-x509-ca-cert',
410
+ 'perl' => 'application/x-perl',
411
+ 'pfa' => 'application/x-font-type1',
412
+ 'pfb' => 'application/x-font-type1',
413
+ 'pfx' => 'application/x-pkcs12',
414
+ 'pgm' => 'image/x-portable-graymap',
415
+ 'pgn' => 'application/x-chess-pgn',
416
+ 'pgp' => 'application/pgp-encrypted',
417
+ 'php' => 'application/x-php',
418
+ 'php3' => 'application/x-php',
419
+ 'php4' => 'application/x-php',
420
+ 'pict' => 'image/x-pict',
421
+ 'pict1' => 'image/x-pict',
422
+ 'pict2' => 'image/x-pict',
423
+ 'pk' => 'application/x-tex-pk',
424
+ 'pkipath' => 'application/pkix-pkipath',
425
+ 'pkr' => 'application/pgp-keys',
426
+ 'pl' => 'application/x-perl',
427
+ 'pla' => 'audio/x-iriver-pla',
428
+ 'pln' => 'application/x-planperfect',
429
+ 'pls' => 'audio/x-scpls',
430
+ 'pm' => 'application/x-perl',
431
+ 'png' => 'image/png',
432
+ 'pnm' => 'image/x-portable-anymap',
433
+ 'pntg' => 'image/x-macpaint',
434
+ 'po' => 'text/x-gettext-translation',
435
+ 'por' => 'application/x-spss-por',
436
+ 'pot' => 'application/vnd.ms-powerpoint',
437
+ 'ppm' => 'image/x-portable-pixmap',
438
+ 'pps' => 'application/vnd.ms-powerpoint',
439
+ 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
440
+ 'ppt' => 'application/vnd.ms-powerpoint',
441
+ 'pptm' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
442
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
443
+ 'ppz' => 'application/vnd.ms-powerpoint',
444
+ 'prc' => 'application/x-palm-database',
445
+ 'ps' => 'application/postscript',
446
+ 'ps.bz2' => 'application/x-bzpostscript',
447
+ 'ps.gz' => 'application/x-gzpostscript',
448
+ 'psd' => 'image/vnd.adobe.photoshop',
449
+ 'psf' => 'application/x-font-linux-psf',
450
+ 'psf.gz' => 'application/x-gz-font-linux-psf',
451
+ 'psflib' => 'audio/x-psflib',
452
+ 'psid' => 'audio/prs.sid',
453
+ 'psw' => 'application/x-pocket-word',
454
+ 'pw' => 'application/x-pw',
455
+ 'py' => 'text/x-python',
456
+ 'pyc' => 'application/x-python-bytecode',
457
+ 'pyo' => 'application/x-python-bytecode',
458
+ 'qif' => 'application/x-qw',
459
+ 'qt' => 'video/quicktime',
460
+ 'qtif' => 'image/x-quicktime',
461
+ 'qtl' => 'application/x-quicktime-media-link',
462
+ 'qtvr' => 'video/quicktime',
463
+ 'ra' => 'audio/vnd.rn-realaudio',
464
+ 'raf' => 'image/x-fuji-raf',
465
+ 'ram' => 'application/ram',
466
+ 'rar' => 'application/x-rar',
467
+ 'ras' => 'image/x-cmu-raster',
468
+ 'raw' => 'image/x-panasonic-raw',
469
+ 'rax' => 'audio/vnd.rn-realaudio',
470
+ 'rb' => 'application/x-ruby',
471
+ 'rdf' => 'application/rdf+xml',
472
+ 'rdfs' => 'application/rdf+xml',
473
+ 'reg' => 'text/x-ms-regedit',
474
+ 'rej' => 'application/x-reject',
475
+ 'rgb' => 'image/x-rgb',
476
+ 'rle' => 'image/rle',
477
+ 'rm' => 'application/vnd.rn-realmedia',
478
+ 'rmj' => 'application/vnd.rn-realmedia',
479
+ 'rmm' => 'application/vnd.rn-realmedia',
480
+ 'rms' => 'application/vnd.rn-realmedia',
481
+ 'rmvb' => 'application/vnd.rn-realmedia',
482
+ 'rmx' => 'application/vnd.rn-realmedia',
483
+ 'roff' => 'text/troff',
484
+ 'rp' => 'image/vnd.rn-realpix',
485
+ 'rpm' => 'application/x-rpm',
486
+ 'rss' => 'application/rss+xml',
487
+ 'rt' => 'text/vnd.rn-realtext',
488
+ 'rtf' => 'application/rtf',
489
+ 'rtx' => 'text/richtext',
490
+ 'rv' => 'video/vnd.rn-realvideo',
491
+ 'rvx' => 'video/vnd.rn-realvideo',
492
+ 's3m' => 'audio/x-s3m',
493
+ 'sam' => 'application/x-amipro',
494
+ 'sami' => 'application/x-sami',
495
+ 'sav' => 'application/x-spss-sav',
496
+ 'scm' => 'text/x-scheme',
497
+ 'sda' => 'application/vnd.stardivision.draw',
498
+ 'sdc' => 'application/vnd.stardivision.calc',
499
+ 'sdd' => 'application/vnd.stardivision.impress',
500
+ 'sdp' => 'application/vnd.stardivision.impress',
501
+ 'sds' => 'application/vnd.stardivision.chart',
502
+ 'sdw' => 'application/vnd.stardivision.writer',
503
+ 'sgf' => 'application/x-go-sgf',
504
+ 'sgi' => 'image/x-sgi',
505
+ 'sgl' => 'application/vnd.stardivision.writer',
506
+ 'sgm' => 'text/sgml',
507
+ 'sgml' => 'text/sgml',
508
+ 'sh' => 'application/x-shellscript',
509
+ 'shar' => 'application/x-shar',
510
+ 'shn' => 'application/x-shorten',
511
+ 'siag' => 'application/x-siag',
512
+ 'sid' => 'audio/prs.sid',
513
+ 'sik' => 'application/x-trash',
514
+ 'sis' => 'application/vnd.symbian.install',
515
+ 'sisx' => 'x-epoc/x-sisx-app',
516
+ 'sit' => 'application/x-stuffit',
517
+ 'siv' => 'application/sieve',
518
+ 'sk' => 'image/x-skencil',
519
+ 'sk1' => 'image/x-skencil',
520
+ 'skr' => 'application/pgp-keys',
521
+ 'slk' => 'text/spreadsheet',
522
+ 'smaf' => 'application/x-smaf',
523
+ 'smc' => 'application/x-snes-rom',
524
+ 'smd' => 'application/vnd.stardivision.mail',
525
+ 'smf' => 'application/vnd.stardivision.math',
526
+ 'smi' => 'application/smil',
527
+ 'smil' => 'application/smil',
528
+ 'sml' => 'application/smil',
529
+ 'sms' => 'application/x-sms-rom',
530
+ 'snd' => 'audio/basic',
531
+ 'so' => 'application/x-sharedlib',
532
+ 'spc' => 'application/x-pkcs7-certificates',
533
+ 'spd' => 'application/x-font-speedo',
534
+ 'spec' => 'text/x-rpm-spec',
535
+ 'spl' => 'application/x-shockwave-flash',
536
+ 'spx' => 'audio/ogg',
537
+ 'sql' => 'text/x-sql',
538
+ 'sr2' => 'image/x-sony-sr2',
539
+ 'src' => 'application/x-wais-source',
540
+ 'srf' => 'image/x-sony-srf',
541
+ 'srt' => 'application/x-subrip',
542
+ 'ssa' => 'text/x-ssa',
543
+ 'stc' => 'application/vnd.sun.xml.calc.template',
544
+ 'std' => 'application/vnd.sun.xml.draw.template',
545
+ 'sti' => 'application/vnd.sun.xml.impress.template',
546
+ 'stm' => 'audio/x-stm',
547
+ 'stw' => 'application/vnd.sun.xml.writer.template',
548
+ 'sty' => 'text/x-tex',
549
+ 'sub' => 'text/x-microdvd',
550
+ 'sun' => 'image/x-sun-raster',
551
+ 'sv4cpio' => 'application/x-sv4cpio',
552
+ 'sv4crc' => 'application/x-sv4crc',
553
+ 'svg' => 'image/svg+xml',
554
+ 'svgz' => 'image/svg+xml-compressed',
555
+ 'swf' => 'application/x-shockwave-flash',
556
+ 'sxc' => 'application/vnd.sun.xml.calc',
557
+ 'sxd' => 'application/vnd.sun.xml.draw',
558
+ 'sxg' => 'application/vnd.sun.xml.writer.global',
559
+ 'sxi' => 'application/vnd.sun.xml.impress',
560
+ 'sxm' => 'application/vnd.sun.xml.math',
561
+ 'sxw' => 'application/vnd.sun.xml.writer',
562
+ 'sylk' => 'text/spreadsheet',
563
+ 't' => 'text/troff',
564
+ 't2t' => 'text/x-txt2tags',
565
+ 'tar' => 'application/x-tar',
566
+ 'tar.bz' => 'application/x-bzip-compressed-tar',
567
+ 'tar.bz2' => 'application/x-bzip-compressed-tar',
568
+ 'tar.gz' => 'application/x-compressed-tar',
569
+ 'tar.lzma' => 'application/x-lzma-compressed-tar',
570
+ 'tar.lzo' => 'application/x-tzo',
571
+ 'tar.xz' => 'application/x-xz-compressed-tar',
572
+ 'tar.z' => 'application/x-tarz',
573
+ 'tbz' => 'application/x-bzip-compressed-tar',
574
+ 'tbz2' => 'application/x-bzip-compressed-tar',
575
+ 'tcl' => 'text/x-tcl',
576
+ 'tex' => 'text/x-tex',
577
+ 'texi' => 'text/x-texinfo',
578
+ 'texinfo' => 'text/x-texinfo',
579
+ 'tga' => 'image/x-tga',
580
+ 'tgz' => 'application/x-compressed-tar',
581
+ 'theme' => 'application/x-theme',
582
+ 'themepack' => 'application/x-windows-themepack',
583
+ 'tif' => 'image/tiff',
584
+ 'tiff' => 'image/tiff',
585
+ 'tk' => 'text/x-tcl',
586
+ 'tlz' => 'application/x-lzma-compressed-tar',
587
+ 'tnef' => 'application/vnd.ms-tnef',
588
+ 'tnf' => 'application/vnd.ms-tnef',
589
+ 'toc' => 'application/x-cdrdao-toc',
590
+ 'torrent' => 'application/x-bittorrent',
591
+ 'tpic' => 'image/x-tga',
592
+ 'tr' => 'text/troff',
593
+ 'ts' => 'application/x-linguist',
594
+ 'tsv' => 'text/tab-separated-values',
595
+ 'tta' => 'audio/x-tta',
596
+ 'ttc' => 'application/x-font-ttf',
597
+ 'ttf' => 'application/x-font-ttf',
598
+ 'ttx' => 'application/x-font-ttx',
599
+ 'txt' => 'text/plain',
600
+ 'txz' => 'application/x-xz-compressed-tar',
601
+ 'tzo' => 'application/x-tzo',
602
+ 'ufraw' => 'application/x-ufraw',
603
+ 'ui' => 'application/x-designer',
604
+ 'uil' => 'text/x-uil',
605
+ 'ult' => 'audio/x-mod',
606
+ 'uni' => 'audio/x-mod',
607
+ 'uri' => 'text/x-uri',
608
+ 'url' => 'text/x-uri',
609
+ 'ustar' => 'application/x-ustar',
610
+ 'vala' => 'text/x-vala',
611
+ 'vapi' => 'text/x-vala',
612
+ 'vcf' => 'text/directory',
613
+ 'vcs' => 'text/calendar',
614
+ 'vct' => 'text/directory',
615
+ 'vda' => 'image/x-tga',
616
+ 'vhd' => 'text/x-vhdl',
617
+ 'vhdl' => 'text/x-vhdl',
618
+ 'viv' => 'video/vivo',
619
+ 'vivo' => 'video/vivo',
620
+ 'vlc' => 'audio/x-mpegurl',
621
+ 'vob' => 'video/mpeg',
622
+ 'voc' => 'audio/x-voc',
623
+ 'vor' => 'application/vnd.stardivision.writer',
624
+ 'vst' => 'image/x-tga',
625
+ 'wav' => 'audio/x-wav',
626
+ 'wax' => 'audio/x-ms-asx',
627
+ 'wb1' => 'application/x-quattropro',
628
+ 'wb2' => 'application/x-quattropro',
629
+ 'wb3' => 'application/x-quattropro',
630
+ 'wbmp' => 'image/vnd.wap.wbmp',
631
+ 'wcm' => 'application/vnd.ms-works',
632
+ 'wdb' => 'application/vnd.ms-works',
633
+ 'wk1' => 'application/vnd.lotus-1-2-3',
634
+ 'wk3' => 'application/vnd.lotus-1-2-3',
635
+ 'wk4' => 'application/vnd.lotus-1-2-3',
636
+ 'wks' => 'application/vnd.lotus-1-2-3',
637
+ 'wma' => 'audio/x-ms-wma',
638
+ 'wmf' => 'image/x-wmf',
639
+ 'wml' => 'text/vnd.wap.wml',
640
+ 'wmls' => 'text/vnd.wap.wmlscript',
641
+ 'wmv' => 'video/x-ms-wmv',
642
+ 'wmx' => 'audio/x-ms-asx',
643
+ 'wp' => 'application/vnd.wordperfect',
644
+ 'wp4' => 'application/vnd.wordperfect',
645
+ 'wp5' => 'application/vnd.wordperfect',
646
+ 'wp6' => 'application/vnd.wordperfect',
647
+ 'wpd' => 'application/vnd.wordperfect',
648
+ 'wpg' => 'application/x-wpg',
649
+ 'wpl' => 'application/vnd.ms-wpl',
650
+ 'wpp' => 'application/vnd.wordperfect',
651
+ 'wps' => 'application/vnd.ms-works',
652
+ 'wri' => 'application/x-mswrite',
653
+ 'wrl' => 'model/vrml',
654
+ 'wv' => 'audio/x-wavpack',
655
+ 'wvc' => 'audio/x-wavpack-correction',
656
+ 'wvp' => 'audio/x-wavpack',
657
+ 'wvx' => 'audio/x-ms-asx',
658
+ 'x3f' => 'image/x-sigma-x3f',
659
+ 'xac' => 'application/x-gnucash',
660
+ 'xbel' => 'application/x-xbel',
661
+ 'xbl' => 'application/xml',
662
+ 'xbm' => 'image/x-xbitmap',
663
+ 'xcf' => 'image/x-xcf',
664
+ 'xcf.bz2' => 'image/x-compressed-xcf',
665
+ 'xcf.gz' => 'image/x-compressed-xcf',
666
+ 'xhtml' => 'application/xhtml+xml',
667
+ 'xi' => 'audio/x-xi',
668
+ 'xla' => 'application/vnd.ms-excel',
669
+ 'xlc' => 'application/vnd.ms-excel',
670
+ 'xld' => 'application/vnd.ms-excel',
671
+ 'xlf' => 'application/x-xliff',
672
+ 'xliff' => 'application/x-xliff',
673
+ 'xll' => 'application/vnd.ms-excel',
674
+ 'xlm' => 'application/vnd.ms-excel',
675
+ 'xls' => 'application/vnd.ms-excel',
676
+ 'xlsm' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
677
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
678
+ 'xlt' => 'application/vnd.ms-excel',
679
+ 'xlw' => 'application/vnd.ms-excel',
680
+ 'xm' => 'audio/x-xm',
681
+ 'xmf' => 'audio/x-xmf',
682
+ 'xmi' => 'text/x-xmi',
683
+ 'xml' => 'application/xml',
684
+ 'xpm' => 'image/x-xpixmap',
685
+ 'xps' => 'application/vnd.ms-xpsdocument',
686
+ 'xsl' => 'application/xslt+xml',
687
+ 'xslfo' => 'text/x-xslfo',
688
+ 'xslt' => 'application/xslt+xml',
689
+ 'xspf' => 'application/xspf+xml',
690
+ 'xul' => 'application/vnd.mozilla.xul+xml',
691
+ 'xwd' => 'image/x-xwindowdump',
692
+ 'xz' => 'application/x-xz',
693
+ 'z' => 'application/x-compress',
694
+ 'zabw' => 'application/x-abiword',
695
+ 'zip' => 'application/zip',
696
+ 'zoo' => 'application/x-zoo',
697
+ }
698
+ TYPES = {
699
+ 'application/andrew-inset' => [%w(ez), %w(), "ATK inset"],
700
+ 'application/annodex' => [%w(anx), %w(), "Annodex exchange format"],
701
+ 'application/atom+xml' => [%w(atom), %w(application/xml), "Atom syndication feed"],
702
+ 'application/dicom' => [%w(dcm), %w(), "DICOM image"],
703
+ 'application/docbook+xml' => [%w(docbook), %w(application/xml), "DocBook document"],
704
+ 'application/ecmascript' => [%w(es), %w(text/plain), "ECMAScript program"],
705
+ 'application/epub+zip' => [%w(epub), %w(), "electronic book document"],
706
+ 'application/gnunet-directory' => [%w(gnd), %w(), "GNUnet search file"],
707
+ 'application/illustrator' => [%w(ai), %w(), "Adobe Illustrator document"],
708
+ 'application/javascript' => [%w(js), %w(text/x-csrc), "JavaScript program"],
709
+ 'application/mathematica' => [%w(nb), %w(text/plain), "Mathematica Notebook"],
710
+ 'application/mathml+xml' => [%w(mml), %w(application/xml), "MathML document"],
711
+ 'application/mbox' => [%w(mbox), %w(text/plain), "mailbox file"],
712
+ 'application/metalink+xml' => [%w(metalink), %w(application/xml), "Metalink file"],
713
+ 'application/msword' => [%w(doc), %w(application/x-ole-storage), "Word document"],
714
+ 'application/msword-template' => [%w(dot), %w(application/msword), "Word template"],
715
+ 'application/mxf' => [%w(mxf), %w(), "MXF video"],
716
+ 'application/octet-stream' => [%w(bin), %w(), "unknown"],
717
+ 'application/oda' => [%w(oda), %w(), "ODA document"],
718
+ 'application/ogg' => [%w(ogx), %w(), "Ogg multimedia file"],
719
+ 'application/pdf' => [%w(pdf), %w(), "PDF document"],
720
+ 'application/pgp-encrypted' => [%w(asc gpg pgp), %w(), "PGP/MIME-encrypted message header"],
721
+ 'application/pgp-keys' => [%w(asc pkr skr), %w(text/plain), "PGP keys"],
722
+ 'application/pkcs10' => [%w(p10), %w(), "PKCS#10 certification request"],
723
+ 'application/pkcs7-signature' => [%w(p7s), %w(text/plain), "detached S/MIME signature"],
724
+ 'application/pkix-cert' => [%w(cer), %w(), "X.509 certificate"],
725
+ 'application/pkix-crl' => [%w(crl), %w(), "Certificate revocation list"],
726
+ 'application/pkix-pkipath' => [%w(pkipath), %w(), "PkiPath certification path"],
727
+ 'application/postscript' => [%w(ps), %w(text/plain), "PS document"],
728
+ 'application/ram' => [%w(ram), %w(text/plain), "RealMedia Metafile"],
729
+ 'application/rdf+xml' => [%w(owl rdf rdfs), %w(application/xml), "RDF file"],
730
+ 'application/rss+xml' => [%w(rss), %w(application/xml), "RSS summary"],
731
+ 'application/rtf' => [%w(rtf), %w(text/plain), "RTF document"],
732
+ 'application/sdp' => [%w(sdp), %w(), "SDP multicast stream file"],
733
+ 'application/sieve' => [%w(siv), %w(application/xml), "Sieve mail filter script"],
734
+ 'application/smil' => [%w(kino smi smil sml), %w(application/xml), "SMIL document"],
735
+ 'application/vnd.apple.mpegurl' => [%w(m3u m3u8), %w(), "HTTP Live Streaming playlist"],
736
+ 'application/vnd.corel-draw' => [%w(cdr), %w(), "Corel Draw drawing"],
737
+ 'application/vnd.emusic-emusic_package' => [%w(emp), %w(), "eMusic download package"],
738
+ 'application/vnd.google-earth.kml+xml' => [%w(kml), %w(application/xml), "KML geographic data"],
739
+ 'application/vnd.google-earth.kmz' => [%w(kmz), %w(application/zip), "KML geographic compressed data"],
740
+ 'application/vnd.hp-hpgl' => [%w(hpgl), %w(), "HPGL file"],
741
+ 'application/vnd.hp-pcl' => [%w(pcl), %w(), "PCL file"],
742
+ 'application/vnd.iccprofile' => [%w(icc icm), %w(), "ICC profile"],
743
+ 'application/vnd.lotus-1-2-3' => [%w(123 wk1 wk3 wk4 wks), %w(), "Lotus 1-2-3 spreadsheet"],
744
+ 'application/vnd.mozilla.xul+xml' => [%w(xul), %w(application/xml), "XUL interface document"],
745
+ 'application/vnd.ms-access' => [%w(mdb), %w(), "JET database"],
746
+ 'application/vnd.ms-cab-compressed' => [%w(cab), %w(), "Microsoft Cabinet archive"],
747
+ 'application/vnd.ms-excel' => [%w(xla xlc xld xll xlm xls xlt xlw), %w(), "Excel spreadsheet"],
748
+ 'application/vnd.ms-powerpoint' => [%w(pot pps ppt ppz), %w(), "PowerPoint presentation"],
749
+ 'application/vnd.ms-tnef' => [%w(tnef tnf), %w(), "TNEF message"],
750
+ 'application/vnd.ms-works' => [%w(wcm wdb wks wps), %w(application/x-ole-storage), "Microsoft Works document"],
751
+ 'application/vnd.ms-wpl' => [%w(wpl), %w(), "WPL playlist"],
752
+ 'application/vnd.ms-xpsdocument' => [%w(xps), %w(application/zip), "XPS document"],
753
+ 'application/vnd.oasis.opendocument.chart' => [%w(odc), %w(application/zip), "ODC chart"],
754
+ 'application/vnd.oasis.opendocument.chart-template' => [%w(otc), %w(application/zip), "ODC template"],
755
+ 'application/vnd.oasis.opendocument.database' => [%w(odb), %w(application/zip), "ODB database"],
756
+ 'application/vnd.oasis.opendocument.formula' => [%w(odf), %w(application/zip), "ODF formula"],
757
+ 'application/vnd.oasis.opendocument.formula-template' => [%w(otf), %w(application/zip), "ODF template"],
758
+ 'application/vnd.oasis.opendocument.graphics' => [%w(odg), %w(application/zip), "ODG drawing"],
759
+ 'application/vnd.oasis.opendocument.graphics-flat-xml' => [%w(fodg), %w(application/xml), "ODG drawing (Flat XML)"],
760
+ 'application/vnd.oasis.opendocument.graphics-template' => [%w(otg), %w(application/zip), "ODG template"],
761
+ 'application/vnd.oasis.opendocument.image' => [%w(odi), %w(application/zip), "ODI image"],
762
+ 'application/vnd.oasis.opendocument.presentation' => [%w(odp), %w(application/zip), "ODP presentation"],
763
+ 'application/vnd.oasis.opendocument.presentation-flat-xml' => [%w(fodp), %w(application/xml), "ODP presentation (Flat XML)"],
764
+ 'application/vnd.oasis.opendocument.presentation-template' => [%w(otp), %w(application/zip), "ODP template"],
765
+ 'application/vnd.oasis.opendocument.spreadsheet' => [%w(ods), %w(application/zip), "ODS spreadsheet"],
766
+ 'application/vnd.oasis.opendocument.spreadsheet-flat-xml' => [%w(fods), %w(application/xml), "ODS spreadsheet (Flat XML)"],
767
+ 'application/vnd.oasis.opendocument.spreadsheet-template' => [%w(ots), %w(application/zip), "ODS template"],
768
+ 'application/vnd.oasis.opendocument.text' => [%w(odt), %w(application/zip), "ODT document"],
769
+ 'application/vnd.oasis.opendocument.text-flat-xml' => [%w(fodt), %w(application/xml), "ODT document (Flat XML)"],
770
+ 'application/vnd.oasis.opendocument.text-master' => [%w(odm), %w(application/zip), "ODM document"],
771
+ 'application/vnd.oasis.opendocument.text-template' => [%w(ott), %w(application/zip), "ODT template"],
772
+ 'application/vnd.oasis.opendocument.text-web' => [%w(oth), %w(application/zip), "OTH template"],
773
+ 'application/vnd.openofficeorg.extension' => [%w(oxt), %w(application/zip), "OpenOffice.org extension"],
774
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => [%w(pptm pptx), %w(application/zip), "PowerPoint 2007 presentation"],
775
+ 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => [%w(ppsx), %w(application/zip), "PowerPoint 2007 show"],
776
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => [%w(xlsm xlsx), %w(application/zip), "Excel 2007 spreadsheet"],
777
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => [%w(docm docx), %w(application/zip), "Word 2007 document"],
778
+ 'application/vnd.rn-realmedia' => [%w(rm rmj rmm rms rmvb rmx), %w(), "RealMedia document"],
779
+ 'application/vnd.stardivision.calc' => [%w(sdc), %w(), "StarCalc spreadsheet"],
780
+ 'application/vnd.stardivision.chart' => [%w(sds), %w(), "StarChart chart"],
781
+ 'application/vnd.stardivision.draw' => [%w(sda), %w(), "StarDraw drawing"],
782
+ 'application/vnd.stardivision.impress' => [%w(sdd sdp), %w(), "StarImpress presentation"],
783
+ 'application/vnd.stardivision.mail' => [%w(smd), %w(), "StarMail email"],
784
+ 'application/vnd.stardivision.math' => [%w(smf), %w(), "StarMath formula"],
785
+ 'application/vnd.stardivision.writer' => [%w(sdw sgl vor), %w(), "StarWriter document"],
786
+ 'application/vnd.sun.xml.calc' => [%w(sxc), %w(application/zip), "OpenOffice Calc spreadsheet"],
787
+ 'application/vnd.sun.xml.calc.template' => [%w(stc), %w(application/zip), "OpenOffice Calc template"],
788
+ 'application/vnd.sun.xml.draw' => [%w(sxd), %w(application/zip), "OpenOffice Draw drawing"],
789
+ 'application/vnd.sun.xml.draw.template' => [%w(std), %w(application/zip), "OpenOffice Draw template"],
790
+ 'application/vnd.sun.xml.impress' => [%w(sxi), %w(application/zip), "OpenOffice Impress presentation"],
791
+ 'application/vnd.sun.xml.impress.template' => [%w(sti), %w(application/zip), "OpenOffice Impress template"],
792
+ 'application/vnd.sun.xml.math' => [%w(sxm), %w(application/zip), "OpenOffice Math formula"],
793
+ 'application/vnd.sun.xml.writer' => [%w(sxw), %w(application/zip), "OpenOffice Writer document"],
794
+ 'application/vnd.sun.xml.writer.global' => [%w(sxg), %w(application/zip), "OpenOffice Writer global document"],
795
+ 'application/vnd.sun.xml.writer.template' => [%w(stw), %w(application/zip), "OpenOffice Writer template"],
796
+ 'application/vnd.symbian.install' => [%w(sis), %w(), "SIS package"],
797
+ 'application/vnd.wordperfect' => [%w(wp wp4 wp5 wp6 wpd wpp), %w(), "WordPerfect document"],
798
+ 'application/x-7z-compressed' => [%w(7z), %w(), "7-zip archive"],
799
+ 'application/x-abiword' => [%w(abw abw.crashed abw.gz zabw), %w(application/xml), "AbiWord document"],
800
+ 'application/x-ace' => [%w(ace), %w(), "ACE archive"],
801
+ 'application/x-alz' => [%w(alz), %w(), "Alzip archive"],
802
+ 'application/x-amipro' => [%w(sam), %w(), "Lotus AmiPro document"],
803
+ 'application/x-aportisdoc' => [%w(pdb pdc), %w(application/x-palm-database), "AportisDoc document"],
804
+ 'application/x-applix-spreadsheet' => [%w(as), %w(), "Applix Spreadsheets spreadsheet"],
805
+ 'application/x-applix-word' => [%w(aw), %w(), "Applix Words document"],
806
+ 'application/x-archive' => [%w(a), %w(), "AR archive"],
807
+ 'application/x-arj' => [%w(arj), %w(), "ARJ archive"],
808
+ 'application/x-asp' => [%w(asp), %w(text/plain), "ASP page"],
809
+ 'application/x-awk' => [%w(awk), %w(application/x-executable text/plain), "AWK script"],
810
+ 'application/x-bcpio' => [%w(bcpio), %w(), "BCPIO document"],
811
+ 'application/x-bittorrent' => [%w(torrent), %w(), "BitTorrent seed file"],
812
+ 'application/x-blender' => [%w(blend blend blender), %w(), "Blender scene"],
813
+ 'application/x-bzdvi' => [%w(dvi.bz2), %w(), "TeX DVI document (bzip-compressed)"],
814
+ 'application/x-bzip' => [%w(bz bz2), %w(), "Bzip archive"],
815
+ 'application/x-bzip-compressed-tar' => [%w(tar.bz tar.bz2 tbz tbz2), %w(application/x-bzip), "Tar archive (bzip-compressed)"],
816
+ 'application/x-bzpdf' => [%w(pdf.bz2), %w(), "PDF document (bzip-compressed)"],
817
+ 'application/x-bzpostscript' => [%w(ps.bz2), %w(), "PostScript document (bzip-compressed)"],
818
+ 'application/x-cb7' => [%w(cb7), %w(application/x-7z-compressed), "comic book archive"],
819
+ 'application/x-cbr' => [%w(cbr), %w(application/x-rar), "comic book archive"],
820
+ 'application/x-cbt' => [%w(cbt), %w(application/x-tar), "comic book archive"],
821
+ 'application/x-cbz' => [%w(cbz), %w(application/zip), "comic book archive"],
822
+ 'application/x-cd-image' => [%w(iso iso9660), %w(), "raw CD image"],
823
+ 'application/x-cdrdao-toc' => [%w(toc), %w(text/plain), "CD Table Of Contents"],
824
+ 'application/x-chess-pgn' => [%w(pgn), %w(text/plain), "PGN chess game notation"],
825
+ 'application/x-chm' => [%w(chm), %w(), "CHM document"],
826
+ 'application/x-cisco-vpn-settings' => [%w(pcf), %w(), "Cisco VPN Settings"],
827
+ 'application/x-compress' => [%w(z), %w(), "UNIX-compressed file"],
828
+ 'application/x-compressed-tar' => [%w(tar.gz tgz), %w(), "Tar archive (gzip-compressed)"],
829
+ 'application/x-cpio' => [%w(cpio), %w(), "CPIO archive"],
830
+ 'application/x-cpio-compressed' => [%w(cpio.gz), %w(), "CPIO archive (gzip-compressed)"],
831
+ 'application/x-csh' => [%w(csh), %w(application/x-shellscript text/plain), "C shell script"],
832
+ 'application/x-cue' => [%w(cue), %w(text/plain), "CD image cuesheet"],
833
+ 'application/x-dar' => [%w(dar), %w(), "DAR archive"],
834
+ 'application/x-dbf' => [%w(dbf), %w(), "Xbase document"],
835
+ 'application/x-dc-rom' => [%w(dc), %w(), "Dreamcast ROM"],
836
+ 'application/x-deb' => [%w(deb), %w(), "Debian package"],
837
+ 'application/x-designer' => [%w(ui), %w(), "Qt Designer file"],
838
+ 'application/x-desktop' => [%w(desktop kdelnk), %w(text/plain), "desktop configuration file"],
839
+ 'application/x-dia-diagram' => [%w(dia), %w(application/xml), "Dia diagram"],
840
+ 'application/x-dvi' => [%w(dvi), %w(), "TeX DVI document"],
841
+ 'application/x-e-theme' => [%w(etheme), %w(), "Enlightenment theme"],
842
+ 'application/x-egon' => [%w(egon), %w(), "Egon Animator animation"],
843
+ 'application/x-fictionbook+xml' => [%w(fb2), %w(application/xml), "FictionBook document"],
844
+ 'application/x-fluid' => [%w(fl), %w(text/plain), "FLTK Fluid file"],
845
+ 'application/x-font-afm' => [%w(afm), %w(), "Adobe font metrics"],
846
+ 'application/x-font-bdf' => [%w(bdf), %w(), "BDF font"],
847
+ 'application/x-font-linux-psf' => [%w(psf), %w(), "Linux PSF console font"],
848
+ 'application/x-font-otf' => [%w(otf), %w(), "OpenType font"],
849
+ 'application/x-font-pcf' => [%w(pcf pcf.gz pcf.z), %w(), "PCF font"],
850
+ 'application/x-font-speedo' => [%w(spd), %w(), "Speedo font"],
851
+ 'application/x-font-ttf' => [%w(ttc ttf), %w(), "TrueType font"],
852
+ 'application/x-font-ttx' => [%w(ttx), %w(text/xml), "TrueType XML font"],
853
+ 'application/x-font-type1' => [%w(gsf pfa pfb), %w(application/postscript), "Postscript type-1 font"],
854
+ 'application/x-gameboy-rom' => [%w(gb), %w(), "Game Boy ROM"],
855
+ 'application/x-gba-rom' => [%w(gba), %w(), "Game Boy Advance ROM"],
856
+ 'application/x-gedcom' => [%w(ged gedcom), %w(), "GEDCOM family history"],
857
+ 'application/x-genesis-rom' => [%w(gen md), %w(), "Genesis ROM"],
858
+ 'application/x-gettext-translation' => [%w(gmo mo), %w(), "translated messages (machine-readable)"],
859
+ 'application/x-glade' => [%w(glade), %w(application/xml), "Glade project"],
860
+ 'application/x-gnucash' => [%w(gnc gnucash xac), %w(), "GnuCash financial data"],
861
+ 'application/x-gnumeric' => [%w(gnumeric), %w(), "Gnumeric spreadsheet"],
862
+ 'application/x-gnuplot' => [%w(gnuplot gp gplt), %w(text/plain), "Gnuplot document"],
863
+ 'application/x-go-sgf' => [%w(sgf), %w(text/plain), "SGF record"],
864
+ 'application/x-graphite' => [%w(gra), %w(), "Graphite scientific graph"],
865
+ 'application/x-gz-font-linux-psf' => [%w(psf.gz), %w(application/x-gzip), "Linux PSF console font (gzip-compressed)"],
866
+ 'application/x-gzdvi' => [%w(dvi.gz), %w(application/x-gzip), "TeX DVI document (gzip-compressed)"],
867
+ 'application/x-gzip' => [%w(gz), %w(), "Gzip archive"],
868
+ 'application/x-gzpdf' => [%w(pdf.gz), %w(application/x-gzip), "PDF document (gzip-compressed)"],
869
+ 'application/x-gzpostscript' => [%w(ps.gz), %w(application/x-gzip), "PostScript document (gzip-compressed)"],
870
+ 'application/x-hdf' => [%w(hdf), %w(), "HDF document"],
871
+ 'application/x-hwp' => [%w(hwp), %w(), "Haansoft Hangul document"],
872
+ 'application/x-hwt' => [%w(hwt), %w(), "Haansoft Hangul document template"],
873
+ 'application/x-ica' => [%w(ica), %w(text/plain), "Citrix ICA settings file"],
874
+ 'application/x-it87' => [%w(it87), %w(text/plain), "IT 8.7 color calibration file"],
875
+ 'application/x-java' => [%w(class), %w(), "Java class"],
876
+ 'application/x-java-archive' => [%w(jar), %w(), "Java archive"],
877
+ 'application/x-java-jce-keystore' => [%w(jceks), %w(), "Java JCE keystore"],
878
+ 'application/x-java-jnlp-file' => [%w(jnlp), %w(application/xml), "JNLP file"],
879
+ 'application/x-java-keystore' => [%w(jks ks), %w(), "Java keystore"],
880
+ 'application/x-java-pack200' => [%w(pack), %w(), "Pack200 Java archive"],
881
+ 'application/x-jbuilder-project' => [%w(jpr jpx), %w(), "JBuilder project"],
882
+ 'application/x-karbon' => [%w(karbon), %w(), "Karbon14 drawing"],
883
+ 'application/x-kchart' => [%w(chrt), %w(), "KChart chart"],
884
+ 'application/x-kexi-connectiondata' => [%w(kexic), %w(), "Kexi settings for database server connection"],
885
+ 'application/x-kexiproject-shortcut' => [%w(kexis), %w(), "shortcut to Kexi project on database server"],
886
+ 'application/x-kexiproject-sqlite2' => [%w(kexi), %w(application/x-sqlite2), "Kexi database file-based project"],
887
+ 'application/x-kexiproject-sqlite3' => [%w(kexi), %w(application/x-sqlite3), "Kexi database file-based project"],
888
+ 'application/x-kformula' => [%w(kfo), %w(), "KFormula formula"],
889
+ 'application/x-killustrator' => [%w(kil), %w(), "KIllustrator drawing"],
890
+ 'application/x-kivio' => [%w(flw), %w(), "Kivio flowchart"],
891
+ 'application/x-kontour' => [%w(kon), %w(), "Kontour drawing"],
892
+ 'application/x-kpovmodeler' => [%w(kpm), %w(), "KPovModeler scene"],
893
+ 'application/x-kpresenter' => [%w(kpr kpt), %w(), "KPresenter presentation"],
894
+ 'application/x-krita' => [%w(kra), %w(), "Krita document"],
895
+ 'application/x-kspread' => [%w(ksp), %w(), "KSpread spreadsheet"],
896
+ 'application/x-kugar' => [%w(kud), %w(), "Kugar document"],
897
+ 'application/x-kword' => [%w(kwd kwt), %w(), "KWord document"],
898
+ 'application/x-lha' => [%w(lha lzh), %w(), "LHA archive"],
899
+ 'application/x-lhz' => [%w(lhz), %w(), "LHZ archive"],
900
+ 'application/x-linguist' => [%w(ts), %w(), "message catalog"],
901
+ 'application/x-lyx' => [%w(lyx), %w(text/plain), "LyX document"],
902
+ 'application/x-lzip' => [%w(lz), %w(), "Lzip archive"],
903
+ 'application/x-lzma' => [%w(lzma), %w(), "LZMA archive"],
904
+ 'application/x-lzma-compressed-tar' => [%w(tar.lzma tlz), %w(), "Tar archive (LZMA-compressed)"],
905
+ 'application/x-lzop' => [%w(lzo), %w(), "LZO archive"],
906
+ 'application/x-m4' => [%w(m4), %w(text/plain), "M4 macro"],
907
+ 'application/x-magicpoint' => [%w(mgp), %w(text/plain), "MagicPoint presentation"],
908
+ 'application/x-markaby' => [%w(mab), %w(application/x-ruby), "Markaby script"],
909
+ 'application/x-mif' => [%w(mif), %w(), "Adobe FrameMaker MIF document"],
910
+ 'application/x-ms-dos-executable' => [%w(exe), %w(), "DOS/Windows executable"],
911
+ 'application/x-msi' => [%w(msi), %w(application/x-ole-storage), "Windows Installer package"],
912
+ 'application/x-mswrite' => [%w(wri), %w(), "WRI document"],
913
+ 'application/x-msx-rom' => [%w(msx), %w(), "MSX ROM"],
914
+ 'application/x-n64-rom' => [%w(n64), %w(), "Nintendo64 ROM"],
915
+ 'application/x-navi-animation' => [%w(ani), %w(), "Windows animated cursor"],
916
+ 'application/x-nes-rom' => [%w(nes), %w(), "NES ROM"],
917
+ 'application/x-netcdf' => [%w(cdf nc), %w(), "Unidata NetCDF document"],
918
+ 'application/x-netshow-channel' => [%w(nsc), %w(video/x-ms-asf), "Windows Media Station file"],
919
+ 'application/x-nintendo-ds-rom' => [%w(nds), %w(), "Nintendo DS ROM"],
920
+ 'application/x-object' => [%w(o), %w(), "object code"],
921
+ 'application/x-oleo' => [%w(oleo), %w(), "GNU Oleo spreadsheet"],
922
+ 'application/x-pak' => [%w(pak), %w(), "PAK archive"],
923
+ 'application/x-palm-database' => [%w(pdb prc), %w(), "Palm OS database"],
924
+ 'application/x-par2' => [%w(par2 par2), %w(), "Parchive archive"],
925
+ 'application/x-perl' => [%w(al perl pl pm), %w(application/x-executable text/plain), "Perl script"],
926
+ 'application/x-php' => [%w(php php3 php4), %w(text/plain), "PHP script"],
927
+ 'application/x-pkcs12' => [%w(p12 pfx), %w(), "PKCS#12 certificate bundle"],
928
+ 'application/x-pkcs7-certificates' => [%w(p7b spc), %w(), "PKCS#7 certificate bundle"],
929
+ 'application/x-planperfect' => [%w(pln), %w(), "PlanPerfect spreadsheet"],
930
+ 'application/x-pocket-word' => [%w(psw), %w(), "Pocket Word document"],
931
+ 'application/x-pw' => [%w(pw), %w(), "Pathetic Writer document"],
932
+ 'application/x-python-bytecode' => [%w(pyc pyo), %w(), "Python bytecode"],
933
+ 'application/x-quattropro' => [%w(wb1 wb2 wb3), %w(), "Quattro Pro spreadsheet"],
934
+ 'application/x-quicktime-media-link' => [%w(qtl), %w(video/quicktime), "QuickTime metalink playlist"],
935
+ 'application/x-qw' => [%w(qif), %w(), "Quicken document"],
936
+ 'application/x-rar' => [%w(rar), %w(), "RAR archive"],
937
+ 'application/x-reject' => [%w(rej), %w(text/plain), "rejected patch"],
938
+ 'application/x-rpm' => [%w(rpm), %w(), "RPM package"],
939
+ 'application/x-ruby' => [%w(rb), %w(application/x-executable text/plain), "Ruby script"],
940
+ 'application/x-sami' => [%w(sami smi), %w(text/plain), "SAMI subtitles"],
941
+ 'application/x-shar' => [%w(shar), %w(), "shell archive"],
942
+ 'application/x-shared-library-la' => [%w(la), %w(text/plain), "libtool shared library"],
943
+ 'application/x-sharedlib' => [%w(so), %w(), "shared library"],
944
+ 'application/x-shellscript' => [%w(sh), %w(application/x-executable text/plain), "shell script"],
945
+ 'application/x-shockwave-flash' => [%w(spl swf), %w(), "Shockwave Flash file"],
946
+ 'application/x-shorten' => [%w(shn), %w(), "Shorten audio"],
947
+ 'application/x-siag' => [%w(siag), %w(), "Siag spreadsheet"],
948
+ 'application/x-smaf' => [%w(mmf smaf), %w(), "SMAF audio"],
949
+ 'application/x-sms-rom' => [%w(gg sms), %w(), "Sega Master System/Game Gear ROM"],
950
+ 'application/x-snes-rom' => [%w(smc), %w(), "Super NES ROM"],
951
+ 'application/x-spss-por' => [%w(por), %w(), "SPSS Portable Data File"],
952
+ 'application/x-spss-sav' => [%w(sav), %w(), "SPSS Data File"],
953
+ 'application/x-stuffit' => [%w(sit), %w(), "StuffIt archive"],
954
+ 'application/x-subrip' => [%w(srt), %w(text/plain), "SubRip subtitles"],
955
+ 'application/x-sv4cpio' => [%w(sv4cpio), %w(), "SV4 CPIO archive"],
956
+ 'application/x-sv4crc' => [%w(sv4crc), %w(), "SV4 CPIO archive (with CRC)"],
957
+ 'application/x-t602' => [%w(602), %w(), "T602 document"],
958
+ 'application/x-tar' => [%w(gtar tar), %w(), "Tar archive"],
959
+ 'application/x-tarz' => [%w(tar.z), %w(), "Tar archive (compressed)"],
960
+ 'application/x-tex-gf' => [%w(gf), %w(), "generic font file"],
961
+ 'application/x-tex-pk' => [%w(pk), %w(), "packed font file"],
962
+ 'application/x-tgif' => [%w(obj), %w(), "TGIF document"],
963
+ 'application/x-theme' => [%w(theme), %w(application/x-desktop), "theme"],
964
+ 'application/x-trash' => [%w(bak old sik), %w(), "backup file"],
965
+ 'application/x-troff-man' => [%w(man), %w(text/plain), "Troff document (with manpage macros)"],
966
+ 'application/x-tzo' => [%w(tar.lzo tzo), %w(), "Tar archive (LZO-compressed)"],
967
+ 'application/x-ufraw' => [%w(ufraw), %w(text/xml), "UFRaw ID image"],
968
+ 'application/x-ustar' => [%w(ustar), %w(), "Ustar archive"],
969
+ 'application/x-wais-source' => [%w(src), %w(), "WAIS source code"],
970
+ 'application/x-windows-themepack' => [%w(themepack), %w(application/vnd.ms-cab-compressed), "Microsoft Windows theme pack"],
971
+ 'application/x-wpg' => [%w(wpg), %w(), "WordPerfect/Drawperfect image"],
972
+ 'application/x-x509-ca-cert' => [%w(cert crt der pem), %w(), "DER/PEM/Netscape-encoded X.509 certificate"],
973
+ 'application/x-xbel' => [%w(xbel), %w(application/xml), "XBEL bookmarks"],
974
+ 'application/x-xliff' => [%w(xlf xliff), %w(application/xml), "XLIFF translation file"],
975
+ 'application/x-xz' => [%w(xz), %w(), "XZ archive"],
976
+ 'application/x-xz-compressed-tar' => [%w(tar.xz txz), %w(), "Tar archive (XZ-compressed)"],
977
+ 'application/x-zoo' => [%w(zoo), %w(), "Zoo archive"],
978
+ 'application/xhtml+xml' => [%w(xhtml), %w(application/xml), "XHTML page"],
979
+ 'application/xml' => [%w(xbl xml), %w(text/plain), "XML document"],
980
+ 'application/xml-dtd' => [%w(dtd), %w(text/plain), "DTD file"],
981
+ 'application/xml-external-parsed-entity' => [%w(ent), %w(application/xml), "XML entities document"],
982
+ 'application/xslt+xml' => [%w(xsl xslt), %w(application/xml), "XSLT stylesheet"],
983
+ 'application/xspf+xml' => [%w(xspf), %w(application/xml), "XSPF playlist"],
984
+ 'application/zip' => [%w(zip), %w(), "Zip archive"],
985
+ 'audio/AMR' => [%w(amr), %w(), "AMR audio"],
986
+ 'audio/AMR-WB' => [%w(awb), %w(), "AMR-WB audio"],
987
+ 'audio/ac3' => [%w(ac3), %w(), "Dolby Digital audio"],
988
+ 'audio/annodex' => [%w(axa), %w(application/annodex), "Annodex Audio"],
989
+ 'audio/basic' => [%w(au snd), %w(), "ULAW (Sun) audio"],
990
+ 'audio/midi' => [%w(kar mid midi), %w(), "MIDI audio"],
991
+ 'audio/mp2' => [%w(mp2), %w(), "MP2 audio"],
992
+ 'audio/mp4' => [%w(aac m4a), %w(), "MPEG-4 audio"],
993
+ 'audio/mpeg' => [%w(mp3 mpga), %w(), "MP3 audio"],
994
+ 'audio/ogg' => [%w(oga ogg spx), %w(application/ogg), "Ogg Audio"],
995
+ 'audio/prs.sid' => [%w(psid sid), %w(), "Commodore 64 audio"],
996
+ 'audio/vnd.rn-realaudio' => [%w(ra rax), %w(), "RealAudio document"],
997
+ 'audio/x-aiff' => [%w(aif aifc aiff), %w(), "AIFF/Amiga/Mac audio"],
998
+ 'audio/x-ape' => [%w(ape), %w(), "Monkey's audio"],
999
+ 'audio/x-flac' => [%w(flac), %w(), "FLAC audio"],
1000
+ 'audio/x-flac+ogg' => [%w(ogg), %w(audio/ogg), "Ogg FLAC audio"],
1001
+ 'audio/x-gsm' => [%w(gsm), %w(), "GSM 06.10 audio"],
1002
+ 'audio/x-iriver-pla' => [%w(pla), %w(), "iRiver Playlist"],
1003
+ 'audio/x-it' => [%w(it), %w(), "Impulse Tracker audio"],
1004
+ 'audio/x-m4b' => [%w(m4b), %w(audio/mp4), "MPEG-4 audio book"],
1005
+ 'audio/x-matroska' => [%w(mka), %w(application/x-matroska), "Matroska audio"],
1006
+ 'audio/x-minipsf' => [%w(minipsf), %w(audio/x-psf), "MiniPSF audio"],
1007
+ 'audio/x-mo3' => [%w(mo3), %w(), "compressed Tracker audio"],
1008
+ 'audio/x-mod' => [%w(669 m15 med mod mtm ult uni), %w(), "Amiga SoundTracker audio"],
1009
+ 'audio/x-mpegurl' => [%w(m3u m3u8 vlc), %w(text/plain), "MP3 audio (streamed)"],
1010
+ 'audio/x-ms-asx' => [%w(asx wax wmx wvx), %w(), "Microsoft ASX playlist"],
1011
+ 'audio/x-ms-wma' => [%w(wma), %w(video/x-ms-asf), "Windows Media audio"],
1012
+ 'audio/x-musepack' => [%w(mp+ mpc mpp), %w(), "Musepack audio"],
1013
+ 'audio/x-psf' => [%w(psf), %w(), "PSF audio"],
1014
+ 'audio/x-psflib' => [%w(psflib), %w(audio/x-psf), "PSFlib audio library"],
1015
+ 'audio/x-s3m' => [%w(s3m), %w(), "Scream Tracker 3 audio"],
1016
+ 'audio/x-scpls' => [%w(pls), %w(), "MP3 ShoutCast playlist"],
1017
+ 'audio/x-speex' => [%w(spx), %w(), "Speex audio"],
1018
+ 'audio/x-speex+ogg' => [%w(ogg), %w(audio/ogg), "Ogg Speex audio"],
1019
+ 'audio/x-stm' => [%w(stm), %w(), "Scream Tracker audio"],
1020
+ 'audio/x-tta' => [%w(tta), %w(), "TrueAudio audio"],
1021
+ 'audio/x-voc' => [%w(voc), %w(), "VOC audio"],
1022
+ 'audio/x-vorbis+ogg' => [%w(ogg), %w(audio/ogg), "Ogg Vorbis audio"],
1023
+ 'audio/x-wav' => [%w(wav), %w(), "WAV audio"],
1024
+ 'audio/x-wavpack' => [%w(wv wvp), %w(), "WavPack audio"],
1025
+ 'audio/x-wavpack-correction' => [%w(wvc), %w(), "WavPack audio correction file"],
1026
+ 'audio/x-xi' => [%w(xi), %w(), "Scream Tracker instrument"],
1027
+ 'audio/x-xm' => [%w(xm), %w(), "FastTracker II audio"],
1028
+ 'audio/x-xmf' => [%w(xmf), %w(), "XMF audio"],
1029
+ 'image/bmp' => [%w(bmp), %w(), "Windows BMP image"],
1030
+ 'image/cgm' => [%w(cgm), %w(), "Computer Graphics Metafile"],
1031
+ 'image/fax-g3' => [%w(g3), %w(), "CCITT G3 fax"],
1032
+ 'image/fits' => [%w(fits), %w(), "FITS document"],
1033
+ 'image/gif' => [%w(gif), %w(), "GIF image"],
1034
+ 'image/ief' => [%w(ief), %w(), "IEF image"],
1035
+ 'image/jp2' => [%w(j2k jp2 jpc jpf jpx), %w(), "JPEG-2000 image"],
1036
+ 'image/jpeg' => [%w(jpe jpeg jpg), %w(), "JPEG image"],
1037
+ 'image/openraster' => [%w(ora), %w(), "OpenRaster archiving image"],
1038
+ 'image/png' => [%w(png), %w(), "PNG image"],
1039
+ 'image/rle' => [%w(rle), %w(), "Run Length Encoded bitmap image"],
1040
+ 'image/svg+xml' => [%w(svg), %w(application/xml), "SVG image"],
1041
+ 'image/svg+xml-compressed' => [%w(svgz), %w(application/x-gzip), "compressed SVG image"],
1042
+ 'image/tiff' => [%w(tif tiff), %w(), "TIFF image"],
1043
+ 'image/vnd.adobe.photoshop' => [%w(psd), %w(), "Photoshop image"],
1044
+ 'image/vnd.djvu' => [%w(djv djvu), %w(), "DjVu image"],
1045
+ 'image/vnd.dwg' => [%w(dwg), %w(), "AutoCAD image"],
1046
+ 'image/vnd.dxf' => [%w(dxf), %w(), "DXF vector image"],
1047
+ 'image/vnd.microsoft.icon' => [%w(ico), %w(), "Microsoft icon"],
1048
+ 'image/vnd.ms-modi' => [%w(mdi), %w(), "Microsoft Document Imaging format"],
1049
+ 'image/vnd.rn-realpix' => [%w(rp), %w(), "RealPix document"],
1050
+ 'image/vnd.wap.wbmp' => [%w(wbmp), %w(), "WBMP image"],
1051
+ 'image/x-3ds' => [%w(3ds), %w(), "3D Studio image"],
1052
+ 'image/x-adobe-dng' => [%w(dng), %w(image/tiff image/x-dcraw), "Adobe DNG negative"],
1053
+ 'image/x-applix-graphics' => [%w(ag), %w(), "Applix Graphics image"],
1054
+ 'image/x-bzeps' => [%w(eps.bz2 epsf.bz2 epsi.bz2), %w(), "EPS image (bzip-compressed)"],
1055
+ 'image/x-canon-cr2' => [%w(cr2), %w(image/tiff image/x-dcraw), "Canon CR2 raw image"],
1056
+ 'image/x-canon-crw' => [%w(crw), %w(image/x-dcraw), "Canon CRW raw image"],
1057
+ 'image/x-cmu-raster' => [%w(ras), %w(), "CMU raster image"],
1058
+ 'image/x-compressed-xcf' => [%w(xcf.bz2 xcf.gz), %w(), "compressed GIMP image"],
1059
+ 'image/x-dds' => [%w(dds), %w(), "DirectDraw surface"],
1060
+ 'image/x-emf' => [%w(emf), %w(), "EMF image"],
1061
+ 'image/x-eps' => [%w(eps epsf epsi), %w(application/postscript), "EPS image"],
1062
+ 'image/x-exr' => [%w(exr), %w(), "EXR image"],
1063
+ 'image/x-fuji-raf' => [%w(raf), %w(image/x-dcraw), "Fuji RAF raw image"],
1064
+ 'image/x-gzeps' => [%w(eps.gz epsf.gz epsi.gz), %w(), "EPS image (gzip-compressed)"],
1065
+ 'image/x-icns' => [%w(icns), %w(), "MacOS X icon"],
1066
+ 'image/x-iff' => [%w(iff), %w(), "IFF image"],
1067
+ 'image/x-ilbm' => [%w(ilbm), %w(), "ILBM image"],
1068
+ 'image/x-jng' => [%w(jng), %w(), "JNG image"],
1069
+ 'image/x-kodak-dcr' => [%w(dcr), %w(image/tiff image/x-dcraw), "Kodak DCR raw image"],
1070
+ 'image/x-kodak-k25' => [%w(k25), %w(image/tiff image/x-dcraw), "Kodak K25 raw image"],
1071
+ 'image/x-kodak-kdc' => [%w(kdc), %w(image/tiff image/x-dcraw), "Kodak KDC raw image"],
1072
+ 'image/x-lwo' => [%w(lwo lwob), %w(), "LightWave object"],
1073
+ 'image/x-lws' => [%w(lws), %w(), "LightWave scene"],
1074
+ 'image/x-macpaint' => [%w(pntg), %w(), "MacPaint Bitmap image"],
1075
+ 'image/x-minolta-mrw' => [%w(mrw), %w(image/x-dcraw), "Minolta MRW raw image"],
1076
+ 'image/x-msod' => [%w(msod), %w(), "Office drawing"],
1077
+ 'image/x-nikon-nef' => [%w(nef), %w(image/tiff image/x-dcraw), "Nikon NEF raw image"],
1078
+ 'image/x-olympus-orf' => [%w(orf), %w(image/x-dcraw), "Olympus ORF raw image"],
1079
+ 'image/x-panasonic-raw' => [%w(raw), %w(image/x-dcraw), "Panasonic raw image"],
1080
+ 'image/x-pcx' => [%w(pcx), %w(), "PCX image"],
1081
+ 'image/x-pentax-pef' => [%w(pef), %w(image/tiff image/x-dcraw), "Pentax PEF raw image"],
1082
+ 'image/x-photo-cd' => [%w(pcd), %w(), "PCD image"],
1083
+ 'image/x-pict' => [%w(pict pict1 pict2), %w(), "Macintosh Quickdraw/PICT drawing"],
1084
+ 'image/x-portable-anymap' => [%w(pnm), %w(), "PNM image"],
1085
+ 'image/x-portable-bitmap' => [%w(pbm), %w(image/x-portable-anymap), "PBM image"],
1086
+ 'image/x-portable-graymap' => [%w(pgm), %w(image/x-portable-anymap), "PGM image"],
1087
+ 'image/x-portable-pixmap' => [%w(ppm), %w(image/x-portable-anymap), "PPM image"],
1088
+ 'image/x-quicktime' => [%w(qif qtif), %w(), "QuickTime image"],
1089
+ 'image/x-rgb' => [%w(rgb), %w(), "RGB image"],
1090
+ 'image/x-sgi' => [%w(sgi), %w(), "SGI image"],
1091
+ 'image/x-sigma-x3f' => [%w(x3f), %w(image/x-dcraw), "Sigma X3F raw image"],
1092
+ 'image/x-skencil' => [%w(sk sk1), %w(), "Skencil document"],
1093
+ 'image/x-sony-arw' => [%w(arw), %w(image/tiff image/x-dcraw), "Sony ARW raw image"],
1094
+ 'image/x-sony-sr2' => [%w(sr2), %w(image/tiff image/x-dcraw), "Sony SR2 raw image"],
1095
+ 'image/x-sony-srf' => [%w(srf), %w(image/tiff image/x-dcraw), "Sony SRF raw image"],
1096
+ 'image/x-sun-raster' => [%w(sun), %w(), "Sun raster image"],
1097
+ 'image/x-tga' => [%w(icb tga tpic vda vst), %w(), "TGA image"],
1098
+ 'image/x-win-bitmap' => [%w(cur), %w(), "Windows cursor"],
1099
+ 'image/x-wmf' => [%w(wmf), %w(), "WMF image"],
1100
+ 'image/x-xbitmap' => [%w(xbm), %w(), "XBM image"],
1101
+ 'image/x-xcf' => [%w(xcf), %w(), "GIMP image"],
1102
+ 'image/x-xfig' => [%w(fig), %w(), "XFig image"],
1103
+ 'image/x-xpixmap' => [%w(xpm), %w(), "XPM image"],
1104
+ 'image/x-xwindowdump' => [%w(xwd), %w(), "X window image"],
1105
+ 'message/rfc822' => [%w(eml), %w(text/plain), "email message"],
1106
+ 'model/vrml' => [%w(wrl), %w(text/plain), "VRML document"],
1107
+ 'text/calendar' => [%w(ics vcs), %w(text/plain), "VCS/ICS calendar"],
1108
+ 'text/css' => [%w(css cssl), %w(text/x-csrc), "CSS stylesheet"],
1109
+ 'text/csv' => [%w(csv), %w(text/plain), "CSV document"],
1110
+ 'text/directory' => [%w(gcrd vcf vct), %w(text/plain), "electronic business card"],
1111
+ 'text/html' => [%w(htm html), %w(text/plain), "HTML document"],
1112
+ 'text/plain' => [%w(asc txt), %w(), "plain text document"],
1113
+ 'text/richtext' => [%w(rtx), %w(text/plain), "rich text document"],
1114
+ 'text/sgml' => [%w(sgm sgml), %w(text/plain), "SGML document"],
1115
+ 'text/spreadsheet' => [%w(slk sylk), %w(text/plain), "spreadsheet interchange document"],
1116
+ 'text/tab-separated-values' => [%w(tsv), %w(text/plain), "TSV document"],
1117
+ 'text/troff' => [%w(roff t tr), %w(text/plain), "Troff document"],
1118
+ 'text/vnd.graphviz' => [%w(dot gv), %w(), "Graphviz DOT graph"],
1119
+ 'text/vnd.rn-realtext' => [%w(rt), %w(), "RealText document"],
1120
+ 'text/vnd.sun.j2me.app-descriptor' => [%w(jad), %w(), "JAD document"],
1121
+ 'text/vnd.wap.wml' => [%w(wml), %w(application/xml), "WML document"],
1122
+ 'text/vnd.wap.wmlscript' => [%w(wmls), %w(), "WMLScript program"],
1123
+ 'text/x-adasrc' => [%w(adb ads), %w(text/plain), "Ada source code"],
1124
+ 'text/x-bibtex' => [%w(bib), %w(text/plain), "BibTeX document"],
1125
+ 'text/x-c++hdr' => [%w(h++ hh hp hpp hxx), %w(text/x-chdr), "C++ header"],
1126
+ 'text/x-c++src' => [%w(c c++ cc cpp cxx), %w(text/x-csrc), "C++ source code"],
1127
+ 'text/x-chdr' => [%w(h), %w(text/x-csrc), "C header"],
1128
+ 'text/x-cmake' => [%w(cmake), %w(), "CMake source code"],
1129
+ 'text/x-csharp' => [%w(cs), %w(text/x-csrc), "C# source code"],
1130
+ 'text/x-csrc' => [%w(c), %w(text/plain), "C source code"],
1131
+ 'text/x-dcl' => [%w(dcl), %w(text/plain), "DCL script"],
1132
+ 'text/x-dsl' => [%w(dsl), %w(text/plain), "DSSSL document"],
1133
+ 'text/x-dsrc' => [%w(d), %w(text/x-csrc), "D source code"],
1134
+ 'text/x-eiffel' => [%w(e eif), %w(text/plain), "Eiffel source code"],
1135
+ 'text/x-emacs-lisp' => [%w(el), %w(text/plain), "Emacs Lisp source code"],
1136
+ 'text/x-erlang' => [%w(erl), %w(text/plain), "Erlang source code"],
1137
+ 'text/x-fortran' => [%w(f f90 f95 for), %w(text/plain), "Fortran source code"],
1138
+ 'text/x-gettext-translation' => [%w(po), %w(text/plain), "translation file"],
1139
+ 'text/x-gettext-translation-template' => [%w(pot), %w(text/plain), "translation template"],
1140
+ 'text/x-google-video-pointer' => [%w(gvp), %w(), "Google Video Pointer"],
1141
+ 'text/x-haskell' => [%w(hs), %w(text/plain), "Haskell source code"],
1142
+ 'text/x-iMelody' => [%w(ime imy), %w(), "iMelody ringtone"],
1143
+ 'text/x-idl' => [%w(idl), %w(text/plain), "IDL document"],
1144
+ 'text/x-iptables' => [%w(iptables), %w(text/plain), "iptables configuration file"],
1145
+ 'text/x-java' => [%w(java), %w(text/x-csrc), "Java source code"],
1146
+ 'text/x-ldif' => [%w(ldif), %w(text/plain), "LDIF address book"],
1147
+ 'text/x-lilypond' => [%w(ly), %w(text/plain), "Lilypond music sheet"],
1148
+ 'text/x-literate-haskell' => [%w(lhs), %w(text/plain), "LHS source code"],
1149
+ 'text/x-log' => [%w(log), %w(text/plain), "application log"],
1150
+ 'text/x-lua' => [%w(lua), %w(application/x-executable text/plain), "Lua script"],
1151
+ 'text/x-matlab' => [%w(m), %w(text/plain), "MATLAB script/function"],
1152
+ 'text/x-microdvd' => [%w(sub), %w(text/plain), "MicroDVD subtitles"],
1153
+ 'text/x-moc' => [%w(moc), %w(text/plain), "Qt MOC file"],
1154
+ 'text/x-mof' => [%w(mof), %w(text/x-csrc), "Managed Object Format"],
1155
+ 'text/x-mpsub' => [%w(sub), %w(text/plain), "MPSub subtitles"],
1156
+ 'text/x-mrml' => [%w(mrl mrml), %w(), "MRML playlist"],
1157
+ 'text/x-ms-regedit' => [%w(reg), %w(text/plain), "Windows Registry extract"],
1158
+ 'text/x-mup' => [%w(mup not), %w(text/plain), "Mup publication"],
1159
+ 'text/x-nfo' => [%w(nfo), %w(text/x-readme), "NFO document"],
1160
+ 'text/x-objcsrc' => [%w(m), %w(text/x-csrc), "Objective-C source code"],
1161
+ 'text/x-ocaml' => [%w(ml mli), %w(), "OCaml source code"],
1162
+ 'text/x-ocl' => [%w(ocl), %w(text/plain), "OCL file"],
1163
+ 'text/x-opml+xml' => [%w(opml), %w(application/xml), "OPML syndication feed"],
1164
+ 'text/x-pascal' => [%w(p pas), %w(text/plain), "Pascal source code"],
1165
+ 'text/x-patch' => [%w(diff patch), %w(text/plain), "differences between files"],
1166
+ 'text/x-python' => [%w(py), %w(application/x-executable text/plain), "Python script"],
1167
+ 'text/x-rpm-spec' => [%w(spec), %w(text/plain), "RPM spec file"],
1168
+ 'text/x-scheme' => [%w(scm), %w(text/plain), "Scheme source code"],
1169
+ 'text/x-setext' => [%w(etx), %w(text/plain), "Setext document"],
1170
+ 'text/x-sql' => [%w(sql), %w(text/plain), "SQL code"],
1171
+ 'text/x-ssa' => [%w(ass ssa), %w(text/plain), "SSA subtitles"],
1172
+ 'text/x-subviewer' => [%w(sub), %w(text/plain), "SubViewer subtitles"],
1173
+ 'text/x-tcl' => [%w(tcl tk), %w(text/plain), "Tcl script"],
1174
+ 'text/x-tex' => [%w(cls dtx ins latex ltx sty tex), %w(text/plain), "TeX document"],
1175
+ 'text/x-texinfo' => [%w(texi texinfo), %w(text/plain), "TeXInfo document"],
1176
+ 'text/x-troff-me' => [%w(me), %w(text/plain), "Troff ME input document"],
1177
+ 'text/x-troff-mm' => [%w(mm), %w(text/plain), "Troff MM input document"],
1178
+ 'text/x-troff-ms' => [%w(ms), %w(text/plain), "Troff MS input document"],
1179
+ 'text/x-txt2tags' => [%w(t2t), %w(text/plain), "txt2tags document"],
1180
+ 'text/x-uil' => [%w(uil), %w(text/plain), "X-Motif UIL table"],
1181
+ 'text/x-uri' => [%w(uri url), %w(text/plain), "resource location"],
1182
+ 'text/x-vala' => [%w(vala vapi), %w(text/x-csrc), "Vala source code"],
1183
+ 'text/x-vhdl' => [%w(vhd vhdl), %w(text/plain), "VHDL document"],
1184
+ 'text/x-xmi' => [%w(xmi), %w(application/xml), "XMI file"],
1185
+ 'text/x-xslfo' => [%w(fo xslfo), %w(application/xml), "XSL FO file"],
1186
+ 'video/3gpp' => [%w(3g2 3ga 3gp 3gpp), %w(video/mp4), "3GPP multimedia file"],
1187
+ 'video/annodex' => [%w(axv), %w(application/annodex), "Annodex Video"],
1188
+ 'video/dv' => [%w(dv), %w(), "DV video"],
1189
+ 'video/mp4' => [%w(m4v mp4), %w(), "MPEG-4 video"],
1190
+ 'video/mpeg' => [%w(m2t mp2 mpe mpeg mpg vob), %w(), "MPEG video"],
1191
+ 'video/ogg' => [%w(ogv), %w(application/ogg), "Ogg Video"],
1192
+ 'video/quicktime' => [%w(moov mov qt qtvr), %w(), "QuickTime video"],
1193
+ 'video/vivo' => [%w(viv vivo), %w(), "Vivo video"],
1194
+ 'video/vnd.rn-realvideo' => [%w(rv rvx), %w(), "RealVideo document"],
1195
+ 'video/x-flic' => [%w(flc fli), %w(), "FLIC animation"],
1196
+ 'video/x-flv' => [%w(flv), %w(), "Flash video"],
1197
+ 'video/x-matroska' => [%w(mkv), %w(application/x-matroska), "Matroska video"],
1198
+ 'video/x-mng' => [%w(mng), %w(), "MNG animation"],
1199
+ 'video/x-ms-asf' => [%w(asf), %w(), "ASF video"],
1200
+ 'video/x-ms-wmv' => [%w(wmv), %w(video/x-ms-asf), "Windows Media video"],
1201
+ 'video/x-msvideo' => [%w(avi divx), %w(), "AVI video"],
1202
+ 'video/x-nsv' => [%w(nsv), %w(), "NullSoft video"],
1203
+ 'video/x-ogm+ogg' => [%w(ogm), %w(video/ogg), "OGM video"],
1204
+ 'video/x-sgi-movie' => [%w(movie), %w(), "SGI video"],
1205
+ 'video/x-theora+ogg' => [%w(ogg), %w(video/ogg), "Ogg Theora video"],
1206
+ 'x-epoc/x-sisx-app' => [%w(sisx), %w(), "SISX package"],
1207
+ }
1208
+ MAGIC = [
1209
+ ['application/vnd.stardivision.writer', [[2089, "StarWriter"]]],
1210
+ ['application/docbook+xml', [[0, "<?xml", [[0..100, "-//OASIS//DTD DocBook XML"], [0..100, "-//KDE//DTD DocBook XML"]]]]],
1211
+ ['image/x-eps', [[0, "%!", [[15, "EPS"]]], [0, "\x04%!", [[16, "EPS"]]]]],
1212
+ ['image/svg+xml', [[0..256, "<!DOCTYPE svg"], [0..256, "<svg"]]],
1213
+ ['application/vnd.corel-draw', []],
1214
+ ['image/x-niff', [[0, "IIN1"]]],
1215
+ ['application/x-mozilla-bookmarks', [[0..64, "<!DOCTYPE NETSCAPE-Bookmark-file-1>"]]],
1216
+ ['application/x-fictionbook+xml', [[0..256, "<FictionBook"]]],
1217
+ ['audio/x-vorbis+ogg', [[0, "OggS", [[28, "\x01vorbis"]]]]],
1218
+ ['image/x-kodak-kdc', [[242, "EASTMAN KODAK COMPANY"]]],
1219
+ ['application/x-xliff', [[0..256, "<xliff"]]],
1220
+ ['audio/x-flac+ogg', [[0, "OggS", [[28, "fLaC"]]], [0, "OggS", [[28, "\x7FFLAC"]]]]],
1221
+ ['audio/x-speex+ogg', [[0, "OggS", [[28, "Speex "]]]]],
1222
+ ['application/x-php', [[0..64, "<?php"]]],
1223
+ ['video/x-ogm+ogg', [[0, "OggS", [[29, "video"]]]]],
1224
+ ['video/x-theora+ogg', [[0, "OggS", [[28, "\x80theora"]]]]],
1225
+ ['application/x-pak', [[0, "PACK"]]],
1226
+ ['application/prs.plucker', [[60, "DataPlkr"]]],
1227
+ ['application/rss+xml', [[0..256, "<rss "], [0..256, "<RSS "]]],
1228
+ ['text/x-opml+xml', [[0..256, "<opml "]]],
1229
+ ['application/vnd.apple.mpegurl', [[0..128, "#EXT-X-TARGETDURATION"]]],
1230
+ ['application/atom+xml', [[0..256, "<feed "]]],
1231
+ ['application/vnd.ms-wpl', [[0..256, "<?wpl"]]],
1232
+ ['text/x-txt2tags', [[0, "%!postproc"], [0, "%!encoding"]]],
1233
+ ['application/msword', [[0, "1\xBE\x00\x00"], [0, "PO^Q`"], [0, "\xFE7\x00#"], [0, "\xDB\xA5-\x00\x00\x00"], [2112, "MSWordDoc"], [2108, "MSWordDoc"], [2112, "Microsoft Word document data"], [546, "bjbj"], [546, "jbjb"]]],
1234
+ ['application/x-font-type1', [[0, "LWFN"], [65, "LWFN"], [0, "%!PS-AdobeFont-1."], [6, "%!PS-AdobeFont-1."], [0, "%!FontType1-1."], [6, "%!FontType1-1."]]],
1235
+ ['application/x-quicktime-media-link', [[0, "<?xml", [[0..64, "<?quicktime"]]], [0, "RTSPtext"], [0, "rtsptext"], [0, "SMILtext"]]],
1236
+ ['application/smil', [[0..256, "<smil"]]],
1237
+ ['audio/x-ms-asx', [[0, "ASF "], [0..64, "<ASX"], [0..64, "<asx"], [0..64, "<Asx"]]],
1238
+ ['image/x-icns', [[0, "icns"]]],
1239
+ ['application/gnunet-directory', [[0, "\x89GND\r\n\x1A\n"]]],
1240
+ ['application/x-t602', [[0, "@CT 0"], [0, "@CT 1"], [0, "@CT 2"]]],
1241
+ ['application/vnd.emusic-emusic_package', [[0, "nF7YLao"]]],
1242
+ ['video/x-sgi-movie', [[0, "MOVI"]]],
1243
+ ['application/sdp', [[0, "v=", [[0..256, "s="]]]]],
1244
+ ['video/x-nsv', [[0, "NSVf"]]],
1245
+ ['video/x-msvideo', [[0, "RIFF", [[8, "AVI "]]]]],
1246
+ ['application/x-netshow-channel', [[0, "[Address]"]]],
1247
+ ['video/x-ms-asf', [[0, "0&\xB2u"], [0, "[Reference]"]]],
1248
+ ['application/x-hwp', [[0, "HWP Document File"]]],
1249
+ ['video/x-flic', [[0, "\x11\xAF"], [0, "\x12\xAF"]]],
1250
+ ['application/vnd.oasis.opendocument.text', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.text"]]]]]]],
1251
+ ['application/vnd.oasis.opendocument.text-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.text-template"]]]]]]],
1252
+ ['application/vnd.oasis.opendocument.text-web', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.text-web"]]]]]]],
1253
+ ['application/vnd.oasis.opendocument.text-master', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.text-master"]]]]]]],
1254
+ ['application/vnd.oasis.opendocument.graphics', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.graphics"]]]]]]],
1255
+ ['application/vnd.oasis.opendocument.graphics-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.graphics-template"]]]]]]],
1256
+ ['application/vnd.oasis.opendocument.presentation', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.presentation"]]]]]]],
1257
+ ['application/vnd.oasis.opendocument.presentation-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.presentation-template"]]]]]]],
1258
+ ['application/vnd.oasis.opendocument.spreadsheet', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.spreadsheet"]]]]]]],
1259
+ ['application/vnd.oasis.opendocument.spreadsheet-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.spreadsheet-template"]]]]]]],
1260
+ ['application/vnd.oasis.opendocument.chart', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.chart"]]]]]]],
1261
+ ['application/vnd.oasis.opendocument.chart-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.chart-template"]]]]]]],
1262
+ ['application/vnd.oasis.opendocument.formula', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.formula"]]]]]]],
1263
+ ['application/vnd.oasis.opendocument.formula-template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.formula-template"]]]]]]],
1264
+ ['application/vnd.oasis.opendocument.image', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.oasis.opendocument.image"]]]]]]],
1265
+ ['application/vnd.symbian.install', [[8, "\x19\x04\x00\x10"]]],
1266
+ ['x-epoc/x-sisx-app', [[0, "z\x1A \x10"]]],
1267
+ ['application/vnd.wordperfect', [[1, "WPC"]]],
1268
+ ['application/x-spss-por', [[40, "ASCII SPSS PORT FILE"]]],
1269
+ ['application/x-spss-sav', [[0, "$FL2"]]],
1270
+ ['application/x-xbel', [[0..256, "<!DOCTYPE xbel"]]],
1271
+ ['application/x-7z-compressed', [[0, "7z\xBC\xAF'\x1C"]]],
1272
+ ['application/x-abiword', [[0..256, "<abiword"], [0..256, "<!DOCTYPE abiword"]]],
1273
+ ['application/x-aportisdoc', [[60, "TEXtREAd"], [60, "TEXtTlDc"]]],
1274
+ ['application/x-applix-spreadsheet', [[0, "*BEGIN SPREADSHEETS"], [0, "*BEGIN", [[7, "SPREADSHEETS"]]]]],
1275
+ ['application/x-applix-word', [[0, "*BEGIN", [[7, "WORDS"]]]]],
1276
+ ['application/x-arc', []],
1277
+ ['image/x-quicktime', [[4, "idat"]]],
1278
+ ['application/x-arj', [[0, "`\xEA"]]],
1279
+ ['application/x-awk', [[0, "#!/bin/gawk"], [0, "#! /bin/gawk"], [0, "#!/usr/bin/gawk"], [0, "#! /usr/bin/gawk"], [0, "#!/usr/local/bin/gawk"], [0, "#! /usr/local/bin/gawk"], [0, "#!/bin/awk"], [0, "#! /bin/awk"], [0, "#!/usr/bin/awk"], [0, "#! /usr/bin/awk"]]],
1280
+ ['application/x-bittorrent', [[0, "d8:announce"]]],
1281
+ ['application/x-blender', [[0, "BLENDER"]]],
1282
+ ['application/x-bzip', [[0, "BZh"]]],
1283
+ ['application/x-cdrdao-toc', [[0, "CD_ROM\n"], [0, "CD_DA\n"], [0, "CD_ROM_XA\n"], [0, "CD_TEXT "], [0, "CATALOG \"", [[22, "\""]]]]],
1284
+ ['application/x-chess-pgn', [[0, "[Event "]]],
1285
+ ['application/x-compress', [[0, "\x1F\x9D"]]],
1286
+ ['application/x-core', [[0, "\x7FELF", [[5, "\x01", [[16, "\x04\x00"]]]]], [0, "\x7FELF", [[5, "\x02", [[16, "\x00\x04"]]]]], [0, "Core\x01"], [0, "Core\x02"]]],
1287
+ ['application/x-cpio', [[0, "\xC7q"], [0, "070701"], [0, "070702"], [0, "q\xC7"]]],
1288
+ ['video/quicktime', [[12, "mdat"], [4, "mdat"], [4, "moov"], [4, "ftypqt"]]],
1289
+ ['application/x-deb', [[0, "!<arch>", [[8, "debian"]]]]],
1290
+ ['application/x-desktop', [[0..32, "[Desktop Entry]"], [0, "[Desktop Action"], [0, "[KDE Desktop Entry]"], [0, "# Config File"], [0, "# KDE Config File"]]],
1291
+ ['application/vnd.ms-excel', [[2080, "Microsoft Excel 5.0 Worksheet"]]],
1292
+ ['application/x-dia-diagram', [[5..100, "<dia:"]]],
1293
+ ['application/x-dvi', [[0, "\xF7\x02"]]],
1294
+ ['video/mpeg', [[0, "G?\xFF\x10"], [0, "\x00\x00\x01\xB3"], [0, "\x00\x00\x01\xBA"]]],
1295
+ ['application/x-fluid', [[0, "# data file for the Fltk"], [0, "version"], [0, "header_name"], [0, "code_name"]]],
1296
+ ['application/vnd.ms-cab-compressed', [[0, "MSCF\x00\x00\x00\x00"]]],
1297
+ ['application/x-font-bdf', [[0, "STARTFONT "]]],
1298
+ ['application/x-font-dos', [[0, "\xFFFON"], [7, "\x00EGA"], [7, "\x00VID"]]],
1299
+ ['application/x-font-framemaker', [[0, "<MakerScreenFont"]]],
1300
+ ['application/x-font-libgrx', [[0, "\x14\x02Y\x19"]]],
1301
+ ['application/x-font-linux-psf', [[0, "6\x04"]]],
1302
+ ['application/x-font-pcf', [[0, "\x01fcp"]]],
1303
+ ['application/x-font-otf', [[0, "OTTO"]]],
1304
+ ['application/x-font-speedo', [[0, "D1.0\r"]]],
1305
+ ['application/x-font-sunos-news', [[0, "StartFont"], [0, "\x13z)"], [8, "\x13z+"]]],
1306
+ ['application/x-font-tex', [[0, "\xF7\x83"], [0, "\xF7Y"], [0, "\xF7\xCA"]]],
1307
+ ['application/x-font-tex-tfm', [[2, "\x00\x11"], [2, "\x00\x12"]]],
1308
+ ['application/x-font-ttf', [[0, "FFIL"], [65, "FFIL"], [0, "\x00\x01\x00\x00\x00"]]],
1309
+ ['application/x-font-ttx', [[0..256, "<ttFont sfntVersion=\"\\x00\\x01\\x00\\x00\" ttLibVersion=\""]]],
1310
+ ['application/x-font-vfont', [[0, "FONT"]]],
1311
+ ['application/x-frame', [[0, "<MakerFile"], [0, "<MIFFile"], [0, "<MakerDictionary"], [0, "<MakerScreenFon"], [0, "<MML"], [0, "<Book"], [0, "<Maker"]]],
1312
+ ['application/x-gdbm', [[0, "\x13W\x9A\xCE"], [0, "\xCE\x9AW\x13"], [0, "GDBM"]]],
1313
+ ['application/x-glade', [[0..256, "<glade-interface"]]],
1314
+ ['application/x-gmc-link', [[0..32, "URL:"]]],
1315
+ ['application/x-gnumeric', [[0..64, "gmr:Workbook"], [0..64, "gnm:Workbook"]]],
1316
+ ['application/x-gtktalog', [[4, "gtktalog "]]],
1317
+ ['application/x-gzip', [[0, "\x1F\x8B"]]],
1318
+ ['application/x-ipod-firmware', [[0, "S T O P"]]],
1319
+ ['application/x-java', [[0, "\xCA\xFE\xBA\xBE"]]],
1320
+ ['application/x-java-jnlp-file', [[0..256, "<jnlp"]]],
1321
+ ['application/x-java-keystore', [[0, "\xED\xFE\xED\xFE"]]],
1322
+ ['application/x-java-jce-keystore', [[0, "\xCE\xCE\xCE\xCE"]]],
1323
+ ['application/x-java-pack200', [[0, "\xCA\xFE\xD0\r"]]],
1324
+ ['application/x-karbon', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-karbon\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-karbon"]]]]]]],
1325
+ ['application/x-kchart', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kchart\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kchart"]]]]]]],
1326
+ ['application/x-kformula', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kformula\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kformula"]]]]]]],
1327
+ ['application/x-killustrator', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-killustrator\x04\x06"]]]]]]],
1328
+ ['application/x-kivio', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kivio\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kivio"]]]]]]],
1329
+ ['application/x-kontour', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kontour\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kontour"]]]]]]],
1330
+ ['application/x-kpresenter', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kpresenter\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kpresenter"]]]]]]],
1331
+ ['application/x-krita', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-krita\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-krita"]]]]]]],
1332
+ ['application/x-kspread', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kspread\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kspread"]]]]]]],
1333
+ ['application/x-kspread-crypt', [[0, "\r\x1A'\x02"]]],
1334
+ ['application/x-ksysv-package', [[4, "KSysV", [[15, "\x01"]]]]],
1335
+ ['application/x-kword', [[0, "\x1F\x8B", [[10, "KOffice", [[18, "application/x-kword\x04\x06"]]]]], [0, "PK\x03\x04", [[30, "mimetype", [[38, "application/x-kword"]]]]]]],
1336
+ ['application/x-kword-crypt', [[0, "\r\x1A'\x01"]]],
1337
+ ['application/x-lha', [[2, "-lh -"], [2, "-lh0-"], [2, "-lh1-"], [2, "-lh2-"], [2, "-lh3-"], [2, "-lh4-"], [2, "-lh5-"], [2, "-lh40-"], [2, "-lhd-"], [2, "-lz4-"], [2, "-lz5-"], [2, "-lzs-"]]],
1338
+ ['application/x-lyx', [[0, "#LyX"]]],
1339
+ ['application/x-lzip', [[0, "LZIP"]]],
1340
+ ['application/x-lzop', [[0, "\x89LZO\x00\r\n\x1A\n"]]],
1341
+ ['application/x-macbinary', [[102, "mBIN"]]],
1342
+ ['application/x-matroska', [[8, "matroska"]]],
1343
+ ['application/mxf', [[0..256, "\x06\x0E+4\x02\x05\x01\x01\r\x01\x02\x01\x01\x02"]]],
1344
+ ['application/vnd.ms-access', [[0, "\x00\x01\x00\x00Standard Jet DB"]]],
1345
+ ['application/x-ms-dos-executable', [[0, "MZ"]]],
1346
+ ['application/x-mswinurl', [[1, "InternetShortcut"], [1, "DEFAULT", [[11, "BASEURL="]]]]],
1347
+ ['application/x-nautilus-link', [[0..32, "<nautilus_object nautilus_link"]]],
1348
+ ['application/x-object', [[0, "\x7FELF", [[5, "\x01", [[16, "\x01\x00"]]]]], [0, "\x7FELF", [[5, "\x02", [[16, "\x00\x01"]]]]]]],
1349
+ ['application/annodex', [[0, "OggS", [[28, "fishead\x00", [[56..512, "CMML\x00\x00\x00\x00"]]]]]]],
1350
+ ['video/annodex', [[0, "OggS", [[28, "fishead\x00", [[56..512, "CMML\x00\x00\x00\x00"]]]]]]],
1351
+ ['audio/annodex', [[0, "OggS", [[28, "fishead\x00", [[56..512, "CMML\x00\x00\x00\x00"]]]]]]],
1352
+ ['application/ogg', [[0, "OggS"]]],
1353
+ ['audio/ogg', [[0, "OggS"]]],
1354
+ ['video/ogg', [[0, "OggS"]]],
1355
+ ['application/vnd.lotus-1-2-3', [[0, "\x00\x00\x02\x00\x06\x04\x06\x00\b\x00\x00\x00\x00\x00"]]],
1356
+ ['application/x-go-sgf', [[0, "(;FF[3]"], [0, "(;FF[4]"]]],
1357
+ ['video/x-flv', [[0, "FLV"]]],
1358
+ ['audio/x-speex', [[0, "Speex"]]],
1359
+ ['application/x-gedcom', [[0, "0 HEAD"]]],
1360
+ ['application/x-cisco-vpn-settings', [[0, "[main]", [[0..256, "AuthType="]]]]],
1361
+ ['application/x-ole-storage', [[0, "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"], [0, "\xD0\xCF\x11\xE0"]]],
1362
+ ['application/x-oleo', [[31, "Oleo"]]],
1363
+ ['application/vnd.iccprofile', [[36, "acsp"]]],
1364
+ ['application/x-par2', [[0, "PAR2"]]],
1365
+ ['application/x-pef-executable', [[0, "Joy!"]]],
1366
+ ['application/x-perl', [[0, "eval \"exec /usr/local/bin/perl"], [1..16, "/bin/perl"], [1..16, "/bin/env perl"]]],
1367
+ ['application/rtf', [[0, "{\\rtf"]]],
1368
+ ['application/x-pocket-word', [[0, "{\\pwi"]]],
1369
+ ['application/x-python-bytecode', [[0, "\x99N\r\n"]]],
1370
+ ['application/epub+zip', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/epub+zip"]]]]]]],
1371
+ ['application/x-rar', [[0, "Rar!"]]],
1372
+ ['video/dv', []],
1373
+ ['application/x-alz', [[0, "ALZ"]]],
1374
+ ['application/x-rpm', [[0, "\xED\xAB\xEE\xDB"]]],
1375
+ ['text/xmcd', [[0, "# xmcd"]]],
1376
+ ['application/x-sc', [[38, "Spreadsheet"]]],
1377
+ ['application/x-sharedlib', [[0, "\x7FELF", [[5, "\x01", [[16, "\x03\x00"]]]]], [0, "\x7FELF", [[5, "\x02", [[16, "\x00\x03"]]]]], [0, "\x83\x01"]]],
1378
+ ['application/x-shellscript', [[10, "# This is a shell archive"], [1..16, "/bin/bash"], [1..16, "/bin/nawk"], [1..16, "/bin/zsh"], [1..16, "/bin/sh"], [1..16, "/bin/ksh"], [0, "#!/usr/bin/env sh"], [0, "#!/usr/bin/env bash"], [0, "#!/usr/bin/env zsh"], [0, "#!/usr/bin/env ksh"]]],
1379
+ ['application/x-shockwave-flash', [[0, "FWS"], [0, "CWS"]]],
1380
+ ['application/x-shorten', [[0, "ajkg"]]],
1381
+ ['image/x-skencil', [[0, "##Sketch"]]],
1382
+ ['application/x-stuffit', [[0, "StuffIt "], [0, "SIT!"]]],
1383
+ ['application/x-subrip', [[0, "1", [[0..256, " --> "]]]]],
1384
+ ['application/x-sami', [[0..256, "<SAMI>"]]],
1385
+ ['text/x-microdvd', [[0, "{1}"], [0, "{0}"], [0..6, "}{"]]],
1386
+ ['text/x-mpsub', [[0..256, "FORMAT="]]],
1387
+ ['text/x-ssa', [[0..256, "[Script Info]"], [0..256, "Dialogue: "]]],
1388
+ ['text/x-subviewer', [[0, "[INFORMATION]"]]],
1389
+ ['text/x-iMelody', [[0, "BEGIN:IMELODY"]]],
1390
+ ['application/x-smaf', [[0, "MMMD"]]],
1391
+ ['text/x-mrml', [[0, "<mrml "]]],
1392
+ ['audio/x-xmf', [[0, "XMF_"], [0, "XMF_2.00\x00\x00\x00\x02"]]],
1393
+ ['application/x-tar', [[257, "ustar\x00"], [257, "ustar \x00"]]],
1394
+ ['application/x-tgif', [[0, "%TGIF"]]],
1395
+ ['text/troff', [[0, ".\\\""], [0, "'\\\""], [0, "'.\\\""], [0, "\\\""]]],
1396
+ ['application/x-xz', [[0, "\xFD7zXZ\x00"]]],
1397
+ ['application/x-zoo', [[20, "\xDC\xA7\xC4\xFD"]]],
1398
+ ['text/x-iptables', [[0..256, "/etc/sysconfig/iptables"], [0..256, "*filter", [[0..256, ":INPUT", [[0..256, ":FORWARD", [[0..256, ":OUTPUT"]]]]]]], [0..256, "-A INPUT", [[0..256, "-A FORWARD", [[0..256, "-A OUTPUT"]]]]], [0..256, "-P INPUT", [[0..256, "-P FORWARD", [[0..256, "-P OUTPUT"]]]]]]],
1399
+ ['audio/ac3', [[0, "\vw"]]],
1400
+ ['audio/AMR', [[0, "#!AMR\n"], [0, "#!AMR_MC1.0\n"]]],
1401
+ ['audio/AMR-WB', [[0, "#!AMR-WB\n"], [0, "#!AMR-WB_MC1.0\n"]]],
1402
+ ['text/x-tex', [[1, "documentclass"]]],
1403
+ ['audio/prs.sid', [[0, "PSID"]]],
1404
+ ['audio/x-adpcm', [[0, ".snd", [[12, "\x00\x00\x00\x17"]]], [0, ".sd\x00", [[12, "\x01\x00\x00\x00"], [12, "\x02\x00\x00\x00"], [12, "\x03\x00\x00\x00"], [12, "\x04\x00\x00\x00"], [12, "\x05\x00\x00\x00"], [12, "\x06\x00\x00\x00"], [12, "\a\x00\x00\x00"], [12, "\x17\x00\x00\x00"]]]]],
1405
+ ['audio/x-aifc', [[8, "AIFC"]]],
1406
+ ['audio/x-aiff', [[8, "AIFF"], [8, "AIFC"], [8, "8SVX"]]],
1407
+ ['audio/x-ape', [[0, "MAC "]]],
1408
+ ['audio/x-it', [[0, "IMPM"]]],
1409
+ ['audio/x-flac', [[0, "fLaC"]]],
1410
+ ['audio/x-wavpack', [[0, "wvpk"]]],
1411
+ ['audio/x-wavpack-correction', [[0, "wvpk"]]],
1412
+ ['audio/midi', [[0, "MThd"]]],
1413
+ ['audio/x-mo3', [[0, "MO3"]]],
1414
+ ['audio/mp4', [[4, "ftypM4A"]]],
1415
+ ['video/mp4', [[4, "ftypisom"], [4, "ftypmp42"], [4, "ftypMSNV"], [4, "ftypM4V "]]],
1416
+ ['audio/x-m4b', [[4, "ftypM4B"]]],
1417
+ ['video/3gpp', [[4, "ftyp3gp"]]],
1418
+ ['audio/mpeg', [[0, "\x00\x00\xFF\xFB"], [0, "ID3"]]],
1419
+ ['audio/x-mpegurl', [[0, "#EXTM3U"]]],
1420
+ ['application/postscript', [[0, "\x04%!"], [0, "%!"]]],
1421
+ ['application/pgp-signature', [[0, "-----BEGIN PGP SIGNED MESSAGE-----"], [0, "-----BEGIN PGP SIGNATURE-----"]]],
1422
+ ['audio/x-psf', [[0, "PSF"]]],
1423
+ ['audio/x-musepack', [[0, "MP+"]]],
1424
+ ['application/vnd.rn-realmedia', [[0, ".RMF"]]],
1425
+ ['text/x-rpm-spec', [[0, "Summary: "], [0, "%define "]]],
1426
+ ['audio/x-s3m', [[44, "SCRM"]]],
1427
+ ['audio/x-scpls', [[0, "[playlist]"], [0, "[Playlist]"], [0, "[PLAYLIST]"]]],
1428
+ ['audio/x-wav', [[8, "WAVE"], [8, "WAV "]]],
1429
+ ['audio/x-xi', [[0, "Extended Intrument:"]]],
1430
+ ['audio/x-xm', [[0, "Extended Module:"]]],
1431
+ ['audio/x-tta', [[0, "TTA1"]]],
1432
+ ['image/bmp', [[0, "BM", [[14, "\f"], [14, "@"], [14, "("]]]]],
1433
+ ['image/gif', [[0, "GIF8"]]],
1434
+ ['image/jpeg', [[0, "\xFF\xD8\xFF"], [0, "\xFF\xD8"]]],
1435
+ ['image/jp2', [[4, "jP"], [0, "\xFFO\xFFQ\x00"], [3, "\fjP "]]],
1436
+ ['image/openraster', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "image/openraster"]]]]]]],
1437
+ ['image/x-dds', [[0, "DDS"]]],
1438
+ ['image/x-xcursor', [[0, "Xcur"]]],
1439
+ ['image/x-exr', [[0, "v/1\x01"]]],
1440
+ ['image/x-canon-crw', [[0, "II\x1A\x00\x00\x00HEAPCCDR"]]],
1441
+ ['image/x-fuji-raf', [[0, "FUJIFILMCCD-RAW "]]],
1442
+ ['application/pgp-keys', [[0, "-----BEGIN PGP PUBLIC KEY BLOCK-----"], [0, "-----BEGIN PGP PRIVATE KEY BLOCK-----"], [0, "\x95\x01"], [0, "\x95\x00"], [0, "\x99\x00"], [0, "\x99\x01"]]],
1443
+ ['image/x-minolta-mrw', [[0, "\x00MRM"]]],
1444
+ ['image/x-olympus-orf', [[0, "IIRO\b\x00\x00\x00"]]],
1445
+ ['image/x-panasonic-raw', [[0, "IIU\x00\b\x00\x00\x00"]]],
1446
+ ['image/x-sigma-x3f', [[0, "FOVb"]]],
1447
+ ['image/png', [[0, "\x89PNG"]]],
1448
+ ['application/pgp-encrypted', [[0, "-----BEGIN PGP MESSAGE-----"]]],
1449
+ ['image/tiff', [[0, "MM\x00*"], [0, "II*\x00"]]],
1450
+ ['image/vnd.dxf', [[0..64, "\nHEADER\n"], [0..64, "\r\nHEADER\r\n"]]],
1451
+ ['image/vnd.ms-modi', [[0, "EP*\x00"]]],
1452
+ ['image/x-applix-graphics', [[0, "*BEGIN", [[7, "GRAPHICS"]]]]],
1453
+ ['application/dicom', [[128, "DICM"]]],
1454
+ ['audio/x-iriver-pla', [[4, "iriver UMS PLA"]]],
1455
+ ['image/x-dib', [[0, "(\x00\x00\x00"]]],
1456
+ ['image/vnd.djvu', [[0, "AT&TFORM", [[12, "DJVM"], [12, "DJVU"]]], [0, "FORM", [[8, "DJVM"], [8, "DJVU"]]]]],
1457
+ ['image/dpx', [[0, "SDPX"]]],
1458
+ ['application/xspf+xml', [[0..64, "<playlist version=\"1"]]],
1459
+ ['image/fits', [[0, "SIMPLE ="]]],
1460
+ ['image/x-fpx', [[0, "FPix"]]],
1461
+ ['image/vnd.microsoft.icon', [[0, "\x00\x00\x01\x00", [[5, "\x00"]]]]],
1462
+ ['application/vnd.ms-tnef', [[0, "x\x9F>\""]]],
1463
+ ['application/pdf', [[0, "%PDF-"]]],
1464
+ ['image/x-pcx', [[0, "\n", [[1, "\x00"], [1, "\x02"], [1, "\x03"], [1, "\x05"]]]]],
1465
+ ['image/x-portable-bitmap', [[0, "P1", [[2, "\n", [[3, "#"]]]]], [0, "P4", [[2, "\n", [[3, "#"]]]]]]],
1466
+ ['image/x-portable-graymap', [[0, "P2", [[2, "\n", [[3, "#"]]]]], [0, "P5", [[2, "\n", [[3, "#"]]]]]]],
1467
+ ['image/x-portable-pixmap', [[0, "P3", [[2, "\n", [[3, "#"]]]]], [0, "P6", [[2, "\n", [[3, "#"]]]]]]],
1468
+ ['image/vnd.adobe.photoshop', []],
1469
+ ['image/x-sun-raster', [[0, "Y\xA6j\x95"]]],
1470
+ ['text/x-lua', [[0, "/bin/lua"], [0, "/bin/env lua"]]],
1471
+ ['image/x-win-bitmap', [[0, "\x00\x00\x02\x00", [[5, "\x00"]]]]],
1472
+ ['application/x-navi-animation', [[0, "RIFF", [[8, "ACON"]]]]],
1473
+ ['image/x-emf', [[0, "\x01\x00\x00\x00", [[40, " EMF", [[44, "\x00\x00\x01\x00", [[58, "\x00\x00"]]]]]]]]],
1474
+ ['image/x-wmf', [[0, "\xD7\xCD\xC6\x9A", [[22, "\x01\x00", [[24, "\t\x00"]]]]], [0, "\x01\x00", [[2, "\t\x00"]]]]],
1475
+ ['image/x-xcf', [[0, "gimp xcf file"]]],
1476
+ ['image/x-xfig', [[0, "#FIG"]]],
1477
+ ['image/x-xpixmap', [[0, "/* XPM"]]],
1478
+ ['message/news', [[0, "Article"], [0, "Path:"], [0, "Xref:"]]],
1479
+ ['message/rfc822', [[0, "#! rnews"], [0, "Forward to"], [0, "From:"], [0, "N#! rnews"], [0, "Pipe to"], [0, "Received:"], [0, "Relay-Version:"], [0, "Return-Path:"], [0, "Return-path:"], [0, "Subject: "]]],
1480
+ ['text/calendar', [[0, "BEGIN:VCALENDAR"], [0, "begin:vcalendar"]]],
1481
+ ['text/directory', [[0, "BEGIN:VCARD"], [0, "begin:vcard"]]],
1482
+ ['application/metalink+xml', [[0..256, "<metalink"]]],
1483
+ ['text/x-python', [[0, "#!/bin/python"], [0, "#! /bin/python"], [0, "eval \"exec /bin/python"], [0, "#!/usr/bin/python"], [0, "#! /usr/bin/python"], [0, "eval \"exec /usr/bin/python"], [0, "#!/usr/local/bin/python"], [0, "#! /usr/local/bin/python"], [0, "eval \"exec /usr/local/bin/python"], [1..16, "/bin/env python"]]],
1484
+ ['text/plain', [[0, "This is TeX,"], [0, "This is METAFONT,"]]],
1485
+ ['application/x-it87', [[0, "IT8.7"]]],
1486
+ ['application/mathematica', [[0, "(************** Content-type: application/mathematica"], [100..256, "This notebook can be used on any computer system with Mathematica"], [10..256, "This is a Mathematica Notebook file. It contains ASCII text"]]],
1487
+ ['application/mac-binhex40', [[11, "must be converted with BinHex"]]],
1488
+ ['text/spreadsheet', [[0, "ID;"]]],
1489
+ ['text/x-matlab', [[0, "function"]]],
1490
+ ['text/vnd.sun.j2me.app-descriptor', [[0, "MIDlet-"]]],
1491
+ ['application/x-ace', [[7, "**ACE**"]]],
1492
+ ['text/x-patch', [[0, "diff\t"], [0, "diff "], [0, "***\t"], [0, "*** "], [0, "=== "], [0, "--- "], [0, "Only in\t"], [0, "Only in "], [0, "Common subdirectories: "], [0, "Index:"]]],
1493
+ ['text/x-emacs-lisp', [[0, "\n("], [0, ";ELC\x13\x00\x00\x00"]]],
1494
+ ['text/html', [[0..256, "<!DOCTYPE HTML"], [0..256, "<!doctype html"], [0..256, "<HEAD"], [0..256, "<head"], [0..256, "<TITLE"], [0..256, "<title"], [0..256, "<HTML"], [0..256, "<html"], [0..256, "<SCRIPT"], [0..256, "<script"], [0, "<BODY"], [0, "<body"], [0, "<!--"], [0, "<h1"], [0, "<H1"], [0, "<!doctype HTML"], [0, "<!DOCTYPE html"]]],
1495
+ ['text/x-google-video-pointer', [[0, "#.download.the.free.Google.Video.Player"], [0, "# download the free Google Video Player"]]],
1496
+ ['text/x-ldif', [[0, "dn: cn="], [0, "dn: mail="]]],
1497
+ ['text/x-makefile', [[0, "#!/usr/bin/make"], [0, "#! /usr/bin/make"]]],
1498
+ ['text/x-ms-regedit', [[0, "REGEDIT"], [0, "Windows Registry Editor Version 5.00"], [0, "\xFF\xFEW\x00i\x00n\x00d\x00o\x00w\x00s\x00 \x00R\x00e\x00g\x00i\x00s\x00t\x00r\x00y\x00 \x00E\x00d\x00i\x00t\x00o\x00r\x00"]]],
1499
+ ['text/x-mup', [[0, "//!Mup"]]],
1500
+ ['text/vnd.graphviz', [[0, "digraph "], [0, "strict digraph "], [0, "graph "], [0, "strict graph "]]],
1501
+ ['application/x-archive', [[0, "<ar>"], [0, "!<arch>"]]],
1502
+ ['audio/x-riff', [[0, "RIFF"]]],
1503
+ ['application/xml', [[0, "<?xml"], [0, "<!--"]]],
1504
+ ['application/zip', [[0, "PK\x03\x04"]]],
1505
+ ['audio/basic', [[0, ".snd"]]],
1506
+ ['application/x-executable', [[0, "\x7FELF", [[5, "\x01", [[16, "\x02\x00"]]]]], [0, "\x7FELF", [[5, "\x02", [[16, "\x00\x02"]]]]], [0, "MZ"], [0, "\x1CR"], [0, "\x10\x01"], [0, "\x11\x01"], [0, "\x83\x01"]]],
1507
+ ['text/x-objcsrc', [[0, "#import"]]],
1508
+ ['text/x-csrc', [[0, "/*"], [0, "//"], [0, "#include"]]],
1509
+ ['text/x-vhdl', [[0, "--"]]],
1510
+ ['application/mbox', [[0, "From "]]],
1511
+ ['text/x-matlab', [[0, "%"]]],
1512
+ ['image/x-tga', [[1, "\x01\x01"], [1, "\x019"], [1, "\x00\x03"], [1, "\x00\n"], [1, "\x00\v"], [1, "\x00\x02"]]],
1513
+ ['text/x-tex', [[0, "%"]]],
1514
+ ['application/vnd.sun.xml.impress.template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.impress"]]]]]]],
1515
+ ['application/x-dar', [[0, "\x00\x00\x00{"]]],
1516
+ ['application/vnd.sun.xml.writer.template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.writer"]]]]]]],
1517
+ ['application/vnd.sun.xml.writer.global', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.writer"]]]]]]],
1518
+ ['application/vnd.sun.xml.writer', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.writer"]]]]]]],
1519
+ ['application/vnd.sun.xml.math', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.math"]]]]]]],
1520
+ ['application/x-csh', [[1..16, "/bin/tcsh"], [1..16, "/bin/csh"], [0, "#!/usr/bin/env csh"], [0, "#!/usr/bin/env tcsh"]]],
1521
+ ['application/vnd.sun.xml.impress', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.impress"]]]]]]],
1522
+ ['application/vnd.sun.xml.draw.template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.draw"]]]]]]],
1523
+ ['application/vnd.sun.xml.draw', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.draw"]]]]]]],
1524
+ ['application/vnd.sun.xml.calc.template', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.calc"]]]]]]],
1525
+ ['application/vnd.sun.xml.calc', [[0, "PK\x03\x04", [[30, "mimetype", [[38, "application/vnd.sun.xml.calc"]]]]]]],
1526
+ ['application/x-sqlite3', [[0, "SQLite format 3"]]],
1527
+ ['application/x-sqlite2', [[0, "** This file contains an SQLite"]]],
1528
+ ['application/x-ruby', [[1..16, "/bin/env ruby"], [1..16, "/bin/ruby"]]],
1529
+ ]
1530
+ end