Skip to content

Commit bac7e15

Browse files
committed
feat(JF-1083): refactor magic.xml
1 parent 3645d16 commit bac7e15

1 file changed

Lines changed: 42 additions & 24 deletions

File tree

src/main/resources/magic.xml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<magic>
3+
<type>
4+
<mime-type>image/jpeg</mime-type>
5+
<extension>jpg</extension>
6+
<description>JPEG image data</description>
7+
<match-short unsigned="true" order="be" offset="0">0xffd8</match-short>
8+
9+
<type>
10+
<description>JFIF standard</description>
11+
<match-string offset="6">JFIF</match-string>
12+
</type>
13+
14+
<type>
15+
<description>Exif format</description>
16+
<match-string offset="6">Exif</match-string>
17+
</type>
18+
</type>
19+
<type>
20+
<mime-type>image/jpeg</mime-type>
21+
<extension>jpg</extension>
22+
<description>JPEG image data, HSI proprietary</description>
23+
<match-string offset="0">hsi1</match-string>
24+
</type>
25+
326
<type>
427
<mime-type>image/gif</mime-type>
528
<extension>gif</extension>
6-
729
<description>GIF image data</description>
830
<match-string offset="0">GIF8</match-string>
931

@@ -31,6 +53,20 @@
3153
<match-string offset="0">MM</match-string>
3254
</type>
3355

56+
<type>
57+
<mime-type>image/x-ms-bmp</mime-type>
58+
<extension>bmp</extension>
59+
<description>MS Windows Bitmap Image</description>
60+
<match-string offset="0">BM</match-string>
61+
</type>
62+
63+
<type>
64+
<mime-type>image/vnd.djvu</mime-type>
65+
<extension>djvu</extension>
66+
<description>DjVu document</description>
67+
<match-string offset="0">AT&amp;T</match-string>
68+
</type>
69+
3470
<type>
3571
<mime-type>video/mpeg</mime-type>
3672
<extension>mpg</extension>
@@ -48,7 +84,7 @@
4884
<type>
4985
<mime-type>video/quicktime</mime-type>
5086
<extension>mov</extension>
51-
<description>Apple QuickTime movie file (moov)</description>
87+
<description>Apple QuickTime movie file (mov)</description>
5288
<match-string offset="4">moov</match-string>
5389
</type>
5490

@@ -90,7 +126,7 @@
90126
</type>
91127

92128
<type>
93-
<description>Zip archive data</description>
129+
<description>ZIP archive data</description>
94130
<mime-type>application/zip</mime-type>
95131
<extension>zip</extension>
96132

@@ -99,7 +135,6 @@
99135
<!-- Password-protected ZIPs -->
100136
<type>
101137
<description>password protected ZIP archive data</description>
102-
<description lang="de">passwortgeschützte ZIP Archivdatei</description>
103138
<mime-type>application/zip;protection=encrypted</mime-type>
104139
<extension>zip</extension>
105140

@@ -110,7 +145,7 @@
110145
<type>
111146
<!-- OpenDocument/OpenOffice/StarOffice/KOffice stuff -->
112147
<match-custom>org.jadice.filetype.matchers.OpenDocumentMatcher</match-custom>
113-
<!-- Office Open XML files (i.e. MS Office 2007) -->
148+
<!-- Office Open XML files (i.e. MS Office 2007) -->
114149
<match-custom>org.jadice.filetype.matchers.OfficeOpenXMLMatcher</match-custom>
115150
</type>
116151

@@ -341,12 +376,14 @@
341376
<match-regexp offset="0" range="1000" multiline="true">PS-Adobe-3</match-regexp>
342377
</type>
343378
</type>
379+
344380
<type>
345381
<mime-type>image/x-portable-bitmap</mime-type>
346382
<extension>pbm</extension>
347383
<description>PBM "rawbits" image data</description>
348384
<match-string offset="0">P4</match-string>
349385
</type>
386+
350387
<type>
351388
<mime-type>image/png</mime-type>
352389
<extension>png</extension>
@@ -493,26 +530,7 @@
493530
</type>
494531

495532
</type>
496-
<type>
497-
<mime-type>image/jpeg</mime-type>
498-
<extension>jpg</extension>
499-
<description>JPEG image data</description>
500-
<match-short unsigned="true" order="be" offset="0">0xffd8</match-short>
501533

502-
<type>
503-
<mime-type>image/jpeg</mime-type>
504-
<extension>jpg</extension>
505-
<description>JFIF standard</description>
506-
<match-string offset="6">JFIF</match-string>
507-
</type>
508-
509-
</type>
510-
<type>
511-
<mime-type>image/jpeg</mime-type>
512-
<extension>jpg</extension>
513-
<description>JPEG image data, HSI proprietary</description>
514-
<match-string offset="0">hsi1</match-string>
515-
</type>
516534
<type>
517535
<mime-type>image/x-emf</mime-type>
518536
<extension>emf</extension>

0 commit comments

Comments
 (0)