1b6cee71dSXin LI#------------------------------------------------------------------------------ 2*a2dfb722SXin LI# $File: compress,v 1.83 2022/08/16 11:16:39 christos Exp $ 3b6cee71dSXin LI# compress: file(1) magic for pure-compression formats (no archives) 4b6cee71dSXin LI# 5b6cee71dSXin LI# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. 6b6cee71dSXin LI# 7b6cee71dSXin LI# Formats for various forms of compressed data 8b6cee71dSXin LI# Formats for "compress" proper have been moved into "compress.c", 9b6cee71dSXin LI# because it tries to uncompress it to figure out what's inside. 10b6cee71dSXin LI 11b6cee71dSXin LI# standard unix compress 12b6cee71dSXin LI0 string \037\235 compress'd data 13b6cee71dSXin LI!:mime application/x-compress 14b6cee71dSXin LI!:apple LZIVZIVU 15b6cee71dSXin LI>2 byte&0x80 >0 block compressed 16b6cee71dSXin LI>2 byte&0x1f x %d bits 17b6cee71dSXin LI 18b6cee71dSXin LI# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) 1948c779cdSXin LI# URL: https://en.wikipedia.org/wiki/Gzip 2048c779cdSXin LI# Reference: https://tools.ietf.org/html/rfc1952 2148c779cdSXin LI# Update: Joerg Jenderek, Apr 2019 22b6cee71dSXin LI# Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002 23b6cee71dSXin LI# * Original filename is only at offset 10 if "extra field" absent 24b6cee71dSXin LI# * Produce shorter output - notably, only report compression methods 25b6cee71dSXin LI# other than 8 ("deflate", the only method defined in RFC 1952). 2648c779cdSXin LI# Note: find defs -iname '*.trid.xml' -exec grep -q '<Bytes>1F8B08' {} \; -ls 2748c779cdSXin LI# TODO: 2848c779cdSXin LI# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ 2948c779cdSXin LI# KPR KOffice/Calligra KPresenter application/x-kpresenter 3048c779cdSXin LI# KPT KOffice/Calligra KPresenter template? application/x-kpresenter 3148c779cdSXin LI# SAV Diggles Saved Game File http://www.innonics.com 3248c779cdSXin LI# SAV FarCry (demo) saved game http://www.farcry-thegame.com 3348c779cdSXin LI# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter 3448c779cdSXin LI0 string \037\213 3548c779cdSXin LI# to display gzip compressed (strength=100=2*50) before other (strength=50)? 3648c779cdSXin LI#!:strength * 2 3748c779cdSXin LI# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary 3848c779cdSXin LI>3 byte&0x18 =0 3948c779cdSXin LI# For binary gzipped no ASCII text should occur 4048c779cdSXin LI# mcd-monu-cad.trid.xml 4148c779cdSXin LI>>10 string MCD Monu-Cad Drawing, Component or Font 4248c779cdSXin LI#>>36 string Created\ with\ MONU-CAD 4348c779cdSXin LI#!:mime application/octet-stream 4448c779cdSXin LI# http://fileformats.archiveteam.org/wiki/Monu-CAD 4548c779cdSXin LI# http://www.monucad.com/downloads/FullDemo-2005.EXE 4648c779cdSXin LI# /HANDS96.MCC Component 4748c779cdSXin LI# /DEMO_DD01.MCD Drawing 4848c779cdSXin LI# /MCALF020.FNT Font 4948c779cdSXin LI!:ext mcc/mcd/fnt 5048c779cdSXin LI# http://www.generalcadd.com 5148c779cdSXin LI>>10 string GXD General CADD, Drawing or Component 5248c779cdSXin LI#!:mime application/octet-stream 5348c779cdSXin LI# /gxc/BUILDINGEDGE.gxc Component 5448c779cdSXin LI# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing 5548c779cdSXin LI# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 5648c779cdSXin LI!:ext gxc/gxd 5748c779cdSXin LI#>>>13 ubyte 0 \b, version 0 5848c779cdSXin LI>>>13 string 09 \b, version 9 5948c779cdSXin LI# other gzipped binary like gzipped tar, VirtualBox extension package,... 6048c779cdSXin LI>>10 default x gzip compressed data 61d38c30c0SXin LI!:mime application/gzip 6248c779cdSXin LI>>>0 use gzip-info 6348c779cdSXin LI# size of the original (uncompressed) input data modulo 2^32 642726a701SXin LI>>-0 offset >48 6548c779cdSXin LI>>>-4 ulelong x \b, original size modulo 2^32 %u 662726a701SXin LI>>-0 offset <48 \b, truncated 6748c779cdSXin LI# gzipped TAR or VirtualBox extension package 6848c779cdSXin LI#!:mime application/x-compressed-tar 6948c779cdSXin LI#!:mime application/x-virtualbox-vbox-extpack 7048c779cdSXin LI# https://www.w3.org/TR/SVG/mimereg.html 7148c779cdSXin LI#!:mime image/image/svg+xml-compressed 7248c779cdSXin LI# zlib.3.gz 7348c779cdSXin LI# microcode-20180312.tgz 7448c779cdSXin LI# tpz same as tgz 7548c779cdSXin LI# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg 7648c779cdSXin LI# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack 7748c779cdSXin LI!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz 7848c779cdSXin LI# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text 7948c779cdSXin LI>3 byte&0x18 >0 gzip compressed data 8048c779cdSXin LI!:mime application/gzip 8148c779cdSXin LI# gzipped tar, gzipped Abiword document 8248c779cdSXin LI#!:mime application/x-compressed-tar 8348c779cdSXin LI#!:mime application/x-abiword-compressed 8448c779cdSXin LI#!:mime image/image/svg+xml-compressed 8548c779cdSXin LI# kleopatra_splashscreen.svgz gzipped .svg 8648c779cdSXin LI!:ext gz/tgz/tpz/zabw/svgz 8748c779cdSXin LI>>0 use gzip-info 8848c779cdSXin LI# size of the original (uncompressed) input data modulo 2^32 892726a701SXin LI>>-0 offset >48 902726a701SXin LI>>>-4 ulelong x \b, original size modulo 2^32 %u 912726a701SXin LI>>-0 offset <48 \b, truncated 9248c779cdSXin LI# display information of gzip compressed files 9348c779cdSXin LI0 name gzip-info 9448c779cdSXin LI#>2 byte x THIS iS GZIP 95b6cee71dSXin LI>2 byte <8 \b, reserved method 96b6cee71dSXin LI>2 byte >8 \b, unknown method 97b6cee71dSXin LI>3 byte &0x01 \b, ASCII 98b6cee71dSXin LI>3 byte &0x02 \b, has CRC 99b6cee71dSXin LI>3 byte &0x04 \b, extra field 100b6cee71dSXin LI>3 byte&0xC =0x08 101b6cee71dSXin LI>>10 string x \b, was "%s" 102b6cee71dSXin LI>3 byte &0x10 \b, has comment 103b6cee71dSXin LI>3 byte &0x20 \b, encrypted 104b6cee71dSXin LI>4 ledate >0 \b, last modified: %s 105b6cee71dSXin LI>8 byte 2 \b, max compression 106b6cee71dSXin LI>8 byte 4 \b, max speed 107b6cee71dSXin LI>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) 108b6cee71dSXin LI>9 byte =0x01 \b, from Amiga 109b6cee71dSXin LI>9 byte =0x02 \b, from VMS 110b6cee71dSXin LI>9 byte =0x03 \b, from Unix 111b6cee71dSXin LI>9 byte =0x04 \b, from VM/CMS 112b6cee71dSXin LI>9 byte =0x05 \b, from Atari 113b6cee71dSXin LI>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) 114b6cee71dSXin LI>9 byte =0x07 \b, from MacOS 115b6cee71dSXin LI>9 byte =0x08 \b, from Z-System 116b6cee71dSXin LI>9 byte =0x09 \b, from CP/M 117b6cee71dSXin LI>9 byte =0x0A \b, from TOPS/20 118b6cee71dSXin LI>9 byte =0x0B \b, from NTFS filesystem (NT) 119b6cee71dSXin LI>9 byte =0x0C \b, from QDOS 120b6cee71dSXin LI>9 byte =0x0D \b, from Acorn RISCOS 12148c779cdSXin LI# size of the original (uncompressed) input data modulo 2^32 12248c779cdSXin LI#>-4 ulelong x \b, original size modulo 2^32 %u 12348c779cdSXin LI#ERROR: line 114: non zero offset 1048572 at level 1 124b6cee71dSXin LI 125b6cee71dSXin LI# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis 126b6cee71dSXin LI0 string \037\036 packed data 127b6cee71dSXin LI!:mime application/octet-stream 128b6cee71dSXin LI>2 belong >1 \b, %d characters originally 129b6cee71dSXin LI>2 belong =1 \b, %d character originally 130b6cee71dSXin LI# 131b6cee71dSXin LI# This magic number is byte-order-independent. 132b6cee71dSXin LI0 short 0x1f1f old packed data 133b6cee71dSXin LI!:mime application/octet-stream 134b6cee71dSXin LI 135b6cee71dSXin LI# XXX - why *two* entries for "compacted data", one of which is 136b6cee71dSXin LI# byte-order independent, and one of which is byte-order dependent? 137b6cee71dSXin LI# 138b6cee71dSXin LI0 short 0x1fff compacted data 139b6cee71dSXin LI!:mime application/octet-stream 140b6cee71dSXin LI# This string is valid for SunOS (BE) and a matching "short" is listed 141b6cee71dSXin LI# in the Ultrix (LE) magic file. 142b6cee71dSXin LI0 string \377\037 compacted data 143b6cee71dSXin LI!:mime application/octet-stream 144b6cee71dSXin LI0 short 0145405 huf output 145b6cee71dSXin LI!:mime application/octet-stream 146b6cee71dSXin LI 147b6cee71dSXin LI# bzip2 148b6cee71dSXin LI0 string BZh bzip2 compressed data 149b6cee71dSXin LI!:mime application/x-bzip2 150*a2dfb722SXin LI!:ext bz2 151b6cee71dSXin LI>3 byte >47 \b, block size = %c00k 152b6cee71dSXin LI 15358a0f0d0SEitan Adler# bzip a block-sorting file compressor 15458a0f0d0SEitan Adler# by Julian Seward <sewardj@cs.man.ac.uk> and others 15558a0f0d0SEitan Adler0 string BZ0 bzip compressed data 15658a0f0d0SEitan Adler!:mime application/x-bzip 15758a0f0d0SEitan Adler>3 byte >47 \b, block size = %c00k 15858a0f0d0SEitan Adler 159b6cee71dSXin LI# lzip 160b6cee71dSXin LI0 string LZIP lzip compressed data 161b6cee71dSXin LI!:mime application/x-lzip 162b6cee71dSXin LI>4 byte x \b, version: %d 163b6cee71dSXin LI 164b6cee71dSXin LI# squeeze and crunch 165b6cee71dSXin LI# Michael Haardt <michael@cantor.informatik.rwth-aachen.de> 166b6cee71dSXin LI0 beshort 0x76FF squeezed data, 167b6cee71dSXin LI>4 string x original name %s 168b6cee71dSXin LI0 beshort 0x76FE crunched data, 169b6cee71dSXin LI>2 string x original name %s 170b6cee71dSXin LI0 beshort 0x76FD LZH compressed data, 171b6cee71dSXin LI>2 string x original name %s 172b6cee71dSXin LI 173b6cee71dSXin LI# Freeze 174b6cee71dSXin LI0 string \037\237 frozen file 2.1 175b6cee71dSXin LI0 string \037\236 frozen file 1.0 (or gzip 0.5) 176b6cee71dSXin LI 177b6cee71dSXin LI# SCO compress -H (LZH) 178b6cee71dSXin LI0 string \037\240 SCO compress -H (LZH) data 179b6cee71dSXin LI 180b6cee71dSXin LI# European GSM 06.10 is a provisional standard for full-rate speech 181b6cee71dSXin LI# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse 182b6cee71dSXin LI# excitation/long term prediction) coding at 13 kbit/s. 183b6cee71dSXin LI# 184b6cee71dSXin LI# There's only a magic nibble (4 bits); that nibble repeats every 33 185b6cee71dSXin LI# bytes. This isn't suited for use, but maybe we can use it someday. 186b6cee71dSXin LI# 187b6cee71dSXin LI# This will cause very short GSM files to be declared as data and 188b6cee71dSXin LI# mismatches to be declared as data too! 189b6cee71dSXin LI#0 byte&0xF0 0xd0 data 190b6cee71dSXin LI#>33 byte&0xF0 0xd0 191b6cee71dSXin LI#>66 byte&0xF0 0xd0 192b6cee71dSXin LI#>99 byte&0xF0 0xd0 193b6cee71dSXin LI#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio 194b6cee71dSXin LI 195b6cee71dSXin LI# lzop from <markus.oberhumer@jk.uni-linz.ac.at> 196b6cee71dSXin LI0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data 197b6cee71dSXin LI>9 beshort <0x0940 198b6cee71dSXin LI>>9 byte&0xf0 =0x00 - version 0. 199b6cee71dSXin LI>>9 beshort&0x0fff x \b%03x, 200b6cee71dSXin LI>>13 byte 1 LZO1X-1, 201b6cee71dSXin LI>>13 byte 2 LZO1X-1(15), 202b6cee71dSXin LI>>13 byte 3 LZO1X-999, 203b6cee71dSXin LI## >>22 bedate >0 last modified: %s, 204b6cee71dSXin LI>>14 byte =0x00 os: MS-DOS 205b6cee71dSXin LI>>14 byte =0x01 os: Amiga 206b6cee71dSXin LI>>14 byte =0x02 os: VMS 207b6cee71dSXin LI>>14 byte =0x03 os: Unix 208b6cee71dSXin LI>>14 byte =0x05 os: Atari 209b6cee71dSXin LI>>14 byte =0x06 os: OS/2 210b6cee71dSXin LI>>14 byte =0x07 os: MacOS 211b6cee71dSXin LI>>14 byte =0x0A os: Tops/20 212b6cee71dSXin LI>>14 byte =0x0B os: WinNT 213b6cee71dSXin LI>>14 byte =0x0E os: Win32 214b6cee71dSXin LI>9 beshort >0x0939 215b6cee71dSXin LI>>9 byte&0xf0 =0x00 - version 0. 216b6cee71dSXin LI>>9 byte&0xf0 =0x10 - version 1. 217b6cee71dSXin LI>>9 byte&0xf0 =0x20 - version 2. 218b6cee71dSXin LI>>9 beshort&0x0fff x \b%03x, 219b6cee71dSXin LI>>15 byte 1 LZO1X-1, 220b6cee71dSXin LI>>15 byte 2 LZO1X-1(15), 221b6cee71dSXin LI>>15 byte 3 LZO1X-999, 222b6cee71dSXin LI## >>25 bedate >0 last modified: %s, 223b6cee71dSXin LI>>17 byte =0x00 os: MS-DOS 224b6cee71dSXin LI>>17 byte =0x01 os: Amiga 225b6cee71dSXin LI>>17 byte =0x02 os: VMS 226b6cee71dSXin LI>>17 byte =0x03 os: Unix 227b6cee71dSXin LI>>17 byte =0x05 os: Atari 228b6cee71dSXin LI>>17 byte =0x06 os: OS/2 229b6cee71dSXin LI>>17 byte =0x07 os: MacOS 230b6cee71dSXin LI>>17 byte =0x0A os: Tops/20 231b6cee71dSXin LI>>17 byte =0x0B os: WinNT 232b6cee71dSXin LI>>17 byte =0x0E os: Win32 233b6cee71dSXin LI 234b6cee71dSXin LI# 4.3BSD-Quasijarus Strong Compression 23548c779cdSXin LI# https://minnie.tuhs.org/Quasijarus/compress.html 236b6cee71dSXin LI0 string \037\241 Quasijarus strong compressed data 237b6cee71dSXin LI 238b6cee71dSXin LI# From: Cory Dikkers <cdikkers@swbell.net> 239b6cee71dSXin LI0 string XPKF Amiga xpkf.library compressed data 240b6cee71dSXin LI0 string PP11 Power Packer 1.1 compressed data 241b6cee71dSXin LI0 string PP20 Power Packer 2.0 compressed data, 242b6cee71dSXin LI>4 belong 0x09090909 fast compression 243b6cee71dSXin LI>4 belong 0x090A0A0A mediocre compression 244b6cee71dSXin LI>4 belong 0x090A0B0B good compression 245b6cee71dSXin LI>4 belong 0x090A0C0C very good compression 246b6cee71dSXin LI>4 belong 0x090A0C0D best compression 247b6cee71dSXin LI 248b6cee71dSXin LI# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) 24948c779cdSXin LI# https://www.7-zip.org or DOC/7zFormat.txt 250b6cee71dSXin LI# 251b6cee71dSXin LI0 string 7z\274\257\047\034 7-zip archive data, 252b6cee71dSXin LI>6 byte x version %d 253b6cee71dSXin LI>7 byte x \b.%d 254b6cee71dSXin LI!:mime application/x-7z-compressed 2553e41d09dSXin LI!:ext 7z/cb7 256b6cee71dSXin LI 257b6cee71dSXin LI# Type: LZMA 258b6cee71dSXin LI0 lelong&0xffffff =0x5d 259b6cee71dSXin LI>12 leshort 0xff LZMA compressed data, 260b6cee71dSXin LI!:mime application/x-lzma 261b6cee71dSXin LI>>5 lequad =0xffffffffffffffff streamed 262b6cee71dSXin LI>>5 lequad !0xffffffffffffffff non-streamed, size %lld 263b6cee71dSXin LI>12 leshort 0 LZMA compressed data, 264b6cee71dSXin LI>>5 lequad =0xffffffffffffffff streamed 265b6cee71dSXin LI>>5 lequad !0xffffffffffffffff non-streamed, size %lld 266b6cee71dSXin LI 267b6cee71dSXin LI# http://tukaani.org/xz/xz-file-format.txt 26843a5ec4eSXin LI0 ustring \xFD7zXZ\x00 XZ compressed data, checksum 2695f0216bdSXin LI!:strength * 2 270b6cee71dSXin LI!:mime application/x-xz 27143a5ec4eSXin LI>7 byte&0xf 0x0 NONE 27243a5ec4eSXin LI>7 byte&0xf 0x1 CRC32 27343a5ec4eSXin LI>7 byte&0xf 0x4 CRC64 27443a5ec4eSXin LI>7 byte&0xf 0xa SHA-256 275b6cee71dSXin LI 276b6cee71dSXin LI# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt 277b6cee71dSXin LI0 string LRZI LRZIP compressed data 278b6cee71dSXin LI>4 byte x - version %d 279b6cee71dSXin LI>5 byte x \b.%d 28043a5ec4eSXin LI>22 byte 1 \b, encrypted 281b6cee71dSXin LI!:mime application/x-lrzip 282b6cee71dSXin LI 28348c779cdSXin LI# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html 284b6cee71dSXin LI0 lelong 0x184d2204 LZ4 compressed data (v1.4+) 285b6cee71dSXin LI!:mime application/x-lz4 286b6cee71dSXin LI# Added by osm0sis@xda-developers.com 287b6cee71dSXin LI0 lelong 0x184c2103 LZ4 compressed data (v1.0-v1.3) 288b6cee71dSXin LI!:mime application/x-lz4 289b6cee71dSXin LI0 lelong 0x184c2102 LZ4 compressed data (v0.1-v0.9) 290b6cee71dSXin LI!:mime application/x-lz4 291b6cee71dSXin LI 292a5d223e6SXin LI# Zstandard/LZ4 skippable frames 293a5d223e6SXin LI# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md 294a5d223e6SXin LI0 lelong&0xFFFFFFF0 0x184D2A50 29540427ccaSGordon Tetlow>(4.l+8) indirect x 296a5d223e6SXin LI 297a5d223e6SXin LI# Zstandard Dictionary ID subroutine 298a5d223e6SXin LI0 name zstd-dictionary-id 299a5d223e6SXin LI# Single Segment = True 300a5d223e6SXin LI>0 byte &0x20 \b, Dictionary ID: 301a5d223e6SXin LI>>0 byte&0x03 0 None 302a5d223e6SXin LI>>0 byte&0x03 1 303a5d223e6SXin LI>>>1 byte x %u 304a5d223e6SXin LI>>0 byte&0x03 2 305a5d223e6SXin LI>>>1 leshort x %u 306a5d223e6SXin LI>>0 byte&0x03 3 307a5d223e6SXin LI>>>1 lelong x %u 308a5d223e6SXin LI# Single Segment = False 309a5d223e6SXin LI>0 byte ^0x20 \b, Dictionary ID: 310a5d223e6SXin LI>>0 byte&0x03 0 None 311a5d223e6SXin LI>>0 byte&0x03 1 312a5d223e6SXin LI>>>2 byte x %u 313a5d223e6SXin LI>>0 byte&0x03 2 314a5d223e6SXin LI>>>2 leshort x %u 315a5d223e6SXin LI>>0 byte&0x03 3 316a5d223e6SXin LI>>>2 lelong x %u 317a5d223e6SXin LI 318a5d223e6SXin LI# Zstandard compressed data 319a5d223e6SXin LI# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md 320a5d223e6SXin LI0 lelong 0xFD2FB522 Zstandard compressed data (v0.2) 321d38c30c0SXin LI!:mime application/zstd 322a5d223e6SXin LI0 lelong 0xFD2FB523 Zstandard compressed data (v0.3) 323d38c30c0SXin LI!:mime application/zstd 324a5d223e6SXin LI0 lelong 0xFD2FB524 Zstandard compressed data (v0.4) 325d38c30c0SXin LI!:mime application/zstd 326a5d223e6SXin LI0 lelong 0xFD2FB525 Zstandard compressed data (v0.5) 327d38c30c0SXin LI!:mime application/zstd 328a5d223e6SXin LI0 lelong 0xFD2FB526 Zstandard compressed data (v0.6) 329d38c30c0SXin LI!:mime application/zstd 330a5d223e6SXin LI0 lelong 0xFD2FB527 Zstandard compressed data (v0.7) 331d38c30c0SXin LI!:mime application/zstd 332a5d223e6SXin LI>4 use zstd-dictionary-id 333a5d223e6SXin LI0 lelong 0xFD2FB528 Zstandard compressed data (v0.8+) 334d38c30c0SXin LI!:mime application/zstd 335a5d223e6SXin LI>4 use zstd-dictionary-id 336a5d223e6SXin LI 337a5d223e6SXin LI# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md 338a5d223e6SXin LI0 lelong 0xEC30A437 Zstandard dictionary 339d38c30c0SXin LI!:mime application/x-std-dictionary 340a5d223e6SXin LI>4 lelong x (ID %u) 341a5d223e6SXin LI 342b6cee71dSXin LI# AFX compressed files (Wolfram Kleff) 343b6cee71dSXin LI2 string -afx- AFX compressed file data 344b6cee71dSXin LI 345b6cee71dSXin LI# Supplementary magic data for the file(1) command to support 346b6cee71dSXin LI# rzip(1). The format is described in magic(5). 347b6cee71dSXin LI# 348b6cee71dSXin LI# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with 349b6cee71dSXin LI# this file. 350b6cee71dSXin LI# 351b6cee71dSXin LI0 string RZIP rzip compressed data 352b6cee71dSXin LI>4 byte x - version %d 353b6cee71dSXin LI>5 byte x \b.%d 354b6cee71dSXin LI>6 belong x (%d bytes) 355b6cee71dSXin LI 356b6cee71dSXin LI0 string ArC\x01 FreeArc archive <http://freearc.org> 357b6cee71dSXin LI 358b6cee71dSXin LI# Type: DACT compressed files 359b6cee71dSXin LI0 long 0x444354C3 DACT compressed data 360b6cee71dSXin LI>4 byte >-1 (version %i. 361b6cee71dSXin LI>5 byte >-1 %i. 362b6cee71dSXin LI>6 byte >-1 %i) 363b6cee71dSXin LI>7 long >0 , original size: %i bytes 364b6cee71dSXin LI>15 long >30 , block size: %i bytes 365b6cee71dSXin LI 366b6cee71dSXin LI# Valve Pack (VPK) files 367b6cee71dSXin LI0 lelong 0x55aa1234 Valve Pak file 368b6cee71dSXin LI>0x4 lelong x \b, version %u 369b6cee71dSXin LI>0x8 lelong x \b, %u entries 370b6cee71dSXin LI 371b6cee71dSXin LI# Snappy framing format 37248c779cdSXin LI# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt 373b6cee71dSXin LI0 string \377\006\0\0sNaPpY snappy framed data 374b6cee71dSXin LI!:mime application/x-snappy-framed 375c2931133SXin LI 37648c779cdSXin LI# qpress, https://www.quicklz.com/ 377c2931133SXin LI0 string qpress10 qpress compressed data 378c2931133SXin LI!:mime application/x-qpress 379c2931133SXin LI 380c2931133SXin LI# Zlib https://www.ietf.org/rfc/rfc6713.txt 3819ce06829SXin LI0 string/b x 3829ce06829SXin LI>0 beshort%31 =0 3839ce06829SXin LI>>0 byte&0xf =8 3849ce06829SXin LI>>>0 byte&0x80 =0 zlib compressed data 385c2931133SXin LI!:mime application/zlib 38658a0f0d0SEitan Adler 38758a0f0d0SEitan Adler# BWC compression 38858a0f0d0SEitan Adler0 string BWC 38958a0f0d0SEitan Adler>3 byte 0 BWC compressed data 39058a0f0d0SEitan Adler 39158a0f0d0SEitan Adler# UCL compression 39258a0f0d0SEitan Adler0 bequad 0x00e955434cff011a UCL compressed data 39358a0f0d0SEitan Adler 39458a0f0d0SEitan Adler# Softlib archive 39558a0f0d0SEitan Adler0 string SLIB Softlib archive 39658a0f0d0SEitan Adler>4 leshort x \b, version %d 39758a0f0d0SEitan Adler>6 leshort x (contains %d files) 39858a0f0d0SEitan Adler 39958a0f0d0SEitan Adler# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 40058a0f0d0SEitan Adler# From: Eric Hall <eric.hall@darkart.com> 40158a0f0d0SEitan Adler0 string bvx- lzfse encoded, no compression 40258a0f0d0SEitan Adler0 string bvx1 lzfse compressed, uncompressed tables 40358a0f0d0SEitan Adler0 string bvx2 lzfse compressed, compressed tables 40458a0f0d0SEitan Adler0 string bvxn lzfse encoded, lzvn compressed 4052726a701SXin LI 4062726a701SXin LI# pcxLib.exe compression program 4072726a701SXin LI# http://www.shikadi.net/moddingwiki/PCX_Library 4082726a701SXin LI0 string/b pcxLib 4092726a701SXin LI>0x0A string/b Copyright\020(c)\020Genus\020Microprogramming,\020Inc. pcxLib compressed 410