summaryrefslogtreecommitdiffstats
path: root/Magdir/archive
diff options
context:
space:
mode:
Diffstat (limited to 'Magdir/archive')
-rw-r--r--Magdir/archive71
1 files changed, 63 insertions, 8 deletions
diff --git a/Magdir/archive b/Magdir/archive
index 0b3a9ba..b75fac0 100644
--- a/Magdir/archive
+++ b/Magdir/archive
@@ -1,4 +1,3 @@
-
#------------------------------------------------------------------------------
# archive: file(1) magic for archive formats (see also "msdos" for self-
# extracting compressed archives)
@@ -8,7 +7,9 @@
# POSIX tar archives
257 string ustar\0 POSIX tar archive
+!:mime application/x-tar # encoding: posix
257 string ustar\040\040\0 GNU tar archive
+!:mime application/x-tar # encoding: gnu
# cpio archives
#
@@ -22,7 +23,9 @@
# are defined as "short"s; I think all the new formats are
# character-header formats and thus are strings, not numbers.
0 short 070707 cpio archive
+!:mime application/x-cpio
0 short 0143561 byte-swapped cpio archive
+!:mime application/x-cpio # encoding: swapped
0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
0 string 070701 ASCII cpio archive (SVR4 with no CRC)
0 string 070702 ASCII cpio archive (SVR4 with CRC)
@@ -30,8 +33,10 @@
# Debian package (needs to go before regular portable archives)
#
0 string =!<arch>\ndebian
+!:mime application/x-debian-package
>8 string debian-split part of multipart Debian package
>8 string debian-binary Debian binary package
+>8 string !debian
>68 string >\0 (format %s)
# These next two lines do not work, because a bzip2 Debian archive
# still uses gzip for the control.tar (first in the archive). Only
@@ -49,6 +54,7 @@
0 short 0177545 old PDP-11 archive
0 long 0100554 apl workspace
0 string =<ar> archive
+!:mime application/x-archive
# MIPS archive (needs to go before regular portable archives)
#
@@ -60,7 +66,7 @@
>19 string B and an EB hash table
>22 string X -- out of date
-0 string -h- Software Tools format archive text
+0 search/1 -h- Software Tools format archive text
#
# XXX - why are there multiple <ar> thingies? Note that 0x213c6172 is
@@ -79,6 +85,7 @@
# "ar" archives?
#
0 string =!<arch> current ar archive
+!:mime application/x-archive
>8 string __.SYMDEF random library
>0 belong =65538 - pre SR9.5
>0 belong =65539 - post SR9.5
@@ -121,15 +128,24 @@
# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
+!:mime application/x-arc
# [JW] stuff taken from idarc, obviously ARC successors:
0 lelong&0x8080ffff 0x00000a1a PAK archive data
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000141a ARC+ archive data
+!:mime application/x-arc
0 lelong&0x8080ffff 0x0000481a HYP archive data
+!:mime application/x-arc
# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
# I can't create either SPARK or ArcFS archives so I have not tested this stuff
@@ -435,6 +451,7 @@
# ARJ archiver (jason@jarthur.Claremont.EDU)
0 leshort 0xea60 ARJ archive data
+!:mime application/x-arj
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
@@ -487,19 +504,32 @@
# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
2 string -lh0- LHarc 1.x/ARX archive data [lh0]
+!:mime application/x-lharc
2 string -lh1- LHarc 1.x/ARX archive data [lh1]
+!:mime application/x-lharc
2 string -lz4- LHarc 1.x archive data [lz4]
+!:mime application/x-lharc
2 string -lz5- LHarc 1.x archive data [lz5]
+!:mime application/x-lharc
# [never seen any but the last; -lh4- reported in comp.compression:]
2 string -lzs- LHa/LZS archive data [lzs]
+!:mime application/x-lha
2 string -lh\40- LHa 2.x? archive data [lh ]
+!:mime application/x-lha
2 string -lhd- LHa 2.x? archive data [lhd]
+!:mime application/x-lha
2 string -lh2- LHa 2.x? archive data [lh2]
+!:mime application/x-lha
2 string -lh3- LHa 2.x? archive data [lh3]
+!:mime application/x-lha
2 string -lh4- LHa (2.x) archive data [lh4]
+!:mime application/x-lha
2 string -lh5- LHa (2.x) archive data [lh5]
+!:mime application/x-lha
2 string -lh6- LHa (2.x) archive data [lh6]
+!:mime application/x-lha
2 string -lh7- LHa (2.x)/LHark archive data [lh7]
+!:mime application/x-lha
>20 byte x - header level %d
# taken from idarc [JW]
2 string -lZ PUT archive data
@@ -508,6 +538,7 @@
# RAR archiver (Greg Roelofs, newt@uchicago.edu)
0 string Rar! RAR archive data,
+!:mime application/x-rar
>44 byte x v%0x,
>10 byte >0 flags:
>>10 byte &0x01 Archive volume,
@@ -532,17 +563,24 @@
# ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004
>4 byte 0x00 Zip archive data
+!:mime application/zip
>4 byte 0x09 Zip archive data, at least v0.9 to extract
+!:mime application/zip
>4 byte 0x0a Zip archive data, at least v1.0 to extract
+!:mime application/zip
>4 byte 0x0b Zip archive data, at least v1.1 to extract
+!:mime application/zip
+>0x161 string WINZIP Zip archive data, WinZIP self-extracting
+!:mime application/zip
>4 byte 0x14
>>30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract
->0x161 string WINZIP Zip archive data, WinZIP self-extracting
-
+!:mime application/zip
# OpenOffice.org / KOffice / StarOffice documents
+# Listed here because they ARE zip files
+#
# From: Abel Cheung <abel@oaka.org>
-# Listed here because they are basically zip files
+>4 byte 0x14
>>30 string mimetype
# KOffice (1.2 or above) formats
@@ -572,12 +610,14 @@
>>>>>69 byte !0x2e presentation
>>>>>69 string .template template
>>>>62 string math Math document
+>>>>62 string base Database file
# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
# http://lists.oasis-open.org/archives/office/200505/msg00006.html
>>>50 string vnd.oasis.opendocument. OpenDocument
>>>>73 string text
>>>>>77 byte !0x2d Text
+!:mime application/vnd.oasis.opendocument.text
>>>>>77 string -template Text Template
>>>>>77 string -web HTML Document Template
>>>>>77 string -master Master Document
@@ -596,6 +636,7 @@
# Zoo archiver
20 lelong 0xfdc4a7dc Zoo archive data
+!:mime application/x-zoo
>4 byte >48 \b, v%c.
>>6 byte >47 \b%c
>>>7 byte >47 \b%c
@@ -607,6 +648,7 @@
# Shell archives
10 string #\ This\ is\ a\ shell\ archive shell archive text
+!:mime application/octet-stream
#
# LBR. NB: May conflict with the questionable
@@ -652,6 +694,7 @@
# Felix von Leitner <felix-file@fefe.de>
0 string d8:announce BitTorrent file
+!:mime application/x-bittorrent
# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
0 beshort 0x0e0f Atari MSA archive data
@@ -709,6 +752,7 @@
# EET archive
# From: Tilman Sauerbeck <tilman@code-monkey.de>
0 belong 0x1ee7ff00 EET archive
+!:mime application/x-eet
# rzip archives
0 string RZIP rzip compressed data
@@ -729,12 +773,11 @@
# http://www.thouky.co.uk/software/psifs/sis.html
# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
8 lelong 0x10000419 Symbian installation file
+!:mime application/vnd.symbian.install
>4 lelong 0x1000006D (EPOC release 3/4/5)
>4 lelong 0x10003A12 (EPOC release 6)
0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
-
-# Pack200 Java archives, http://jcp.org/en/jsr/detail?id=200
-0 belong 0xcafed00d Pack200 Java archive
+!:mime x-epoc/x-sisx-app
# From "Nelson A. de Oliveira" <naoliv@gmail.com>
0 string MPQ\032 MoPaQ (MPQ) archive
@@ -748,3 +791,15 @@
# .kgb
0 string KGB_arch KGB Archiver file
>10 string x with compression level %.1s
+
+# xar (eXtensible ARchiver) archive
+# From: "David Remahl" <dremahl@apple.com>
+0 string xar! xar archive
+#>4 beshort x header size %d
+>6 beshort x version %d,
+#>8 quad x compressed TOC: %d,
+#>16 quad x uncompressed TOC: %d,
+>24 belong 0 no checksum
+>24 belong 1 SHA-1 checksum
+>24 belong 2 MD5 checksum
+
OpenPOWER on IntegriCloud