summaryrefslogtreecommitdiff
path: root/magic/Magdir/compress
diff options
context:
space:
mode:
Diffstat (limited to 'magic/Magdir/compress')
-rw-r--r--magic/Magdir/compress48
1 files changed, 40 insertions, 8 deletions
diff --git a/magic/Magdir/compress b/magic/Magdir/compress
index 94c209d..beb8ebe 100644
--- a/magic/Magdir/compress
+++ b/magic/Magdir/compress
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
-# $File: compress,v 1.49 2011/12/07 22:04:27 christos Exp $
+# $File: compress,v 1.62 2014/09/13 14:27:12 christos Exp $
# compress: file(1) magic for pure-compression formats (no archives)
#
# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
@@ -22,6 +22,7 @@
# other than 8 ("deflate", the only method defined in RFC 1952).
0 string \037\213 gzip compressed data
!:mime application/x-gzip
+!:strength * 2
>2 byte <8 \b, reserved method
>2 byte >8 \b, unknown method
>3 byte &0x01 \b, ASCII
@@ -30,6 +31,10 @@
>3 byte&0xC =0x08
>>10 string x \b, was "%s"
>3 byte &0x10 \b, has comment
+>3 byte &0x20 \b, encrypted
+>4 ledate >0 \b, last modified: %s
+>8 byte 2 \b, max compression
+>8 byte 4 \b, max speed
>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
>9 byte =0x01 \b, from Amiga
>9 byte =0x02 \b, from VMS
@@ -44,11 +49,6 @@
>9 byte =0x0B \b, from NTFS filesystem (NT)
>9 byte =0x0C \b, from QDOS
>9 byte =0x0D \b, from Acorn RISCOS
->3 byte &0x10 \b, comment
->3 byte &0x20 \b, encrypted
->4 ledate >0 \b, last modified: %s
->8 byte 2 \b, max compression
->8 byte 4 \b, max speed
# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
0 string \037\036 packed data
@@ -191,10 +191,13 @@
# Type: LZMA
0 lelong&0xffffff =0x5d
->12 leshort =0xff LZMA compressed data,
+>12 leshort 0xff LZMA compressed data,
+!:mime application/x-lzma
+>>5 lequad =0xffffffffffffffff streamed
+>>5 lequad !0xffffffffffffffff non-streamed, size %lld
+>12 leshort 0 LZMA compressed data,
>>5 lequad =0xffffffffffffffff streamed
>>5 lequad !0xffffffffffffffff non-streamed, size %lld
-!:mime application/x-lzma
# http://tukaani.org/xz/xz-file-format.txt
0 ustring \xFD7zXZ\x00 XZ compressed data
@@ -206,6 +209,15 @@
>5 byte x \b.%d
!:mime application/x-lrzip
+# http://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
+0 lelong 0x184d2204 LZ4 compressed data (v1.4+)
+!:mime application/x-lz4
+# Added by osm0sis@xda-developers.com
+0 lelong 0x184c2103 LZ4 compressed data (v1.0-v1.3)
+!:mime application/x-lz4
+0 lelong 0x184c2102 LZ4 compressed data (v0.1-v0.9)
+!:mime application/x-lz4
+
# AFX compressed files (Wolfram Kleff)
2 string -afx- AFX compressed file data
@@ -229,3 +241,23 @@
>6 byte >-1 %i)
>7 long >0 , original size: %i bytes
>15 long >30 , block size: %i bytes
+
+# Valve Pack (VPK) files
+0 lelong 0x55aa1234 Valve Pak file
+>0x4 lelong x \b, version %u
+>0x8 lelong x \b, %u entries
+
+# Snappy framing format
+# http://code.google.com/p/snappy/source/browse/trunk/framing_format.txt
+0 string \377\006\0\0sNaPpY snappy framed data
+!:mime application/x-snappy-framed
+
+# qpress, http://www.quicklz.com/
+0 string qpress10 qpress compressed data
+!:mime application/x-qpress
+
+# Zlib https://www.ietf.org/rfc/rfc6713.txt
+0 beshort%31 =0
+>0 byte&0xf =8
+>>0 byte&0x80 =0 zlib compressed data
+!:mime application/zlib