1 2#------------------------------------------------------------------------------ 3# $File: modem,v 1.11 2022/10/19 20:15:16 christos Exp $ 4# modem: file(1) magic for modem programs 5# 6# From: Florian La Roche <florian@knorke.saar.de> 71 string PC\ Research,\ Inc Digifax-G3-File 8>29 byte 1 \b, fine resolution 9>29 byte 0 \b, normal resolution 10 11# Summary: CCITT Group 3 Facsimile in "raw" form (i.e. no header). 12# Modified by: Joerg Jenderek 13# URL: https://de.wikipedia.org/wiki/Fax 14# http://fileformats.archiveteam.org/wiki/CCITT_Group_3 15# Reference: https://web.archive.org/web/20020628195336/http://www.netnam.vn/unescocourse/computervision/104.htm 16# GRR: EOL of G3 is too general as it catches also TrueType fonts, Postscript PrinterFontMetric, others 170 short 0x0100 18# 16 0-bits near beginning like True Type fonts *.ttf, Postscript PrinterFontMetric *.pfm, FTYPE.HYPERCARD, XFER 19>2 search/9 \0\0 20# maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3 21>2 default x 22# skip IRCAM file (VAX big-endian) ./audio 23>>0 belong !0x0001a364 24# skip GEM Image data ./images 25>>>2 beshort !0x0008 26# look for first keyword of Panorama database *.pan 27>>>>11 search/262 \x06DESIGN 28# skip Panorama database 29>>>>11 default x 30# old Apple DreamWorld DreamGrafix *.3200 with keyword at end of g3 looking files 31>>>>>27118 search/1864 DreamWorld 32>>>>>27118 default x 33# skip MouseTrap/Mt.Defaults with file size 16 found on Golden Orchard Apple II CD Rom 34>>>>>>8 ubequad !0x2e01010454010203 35# skip PICTUREH.SML found on Golden Orchard Apple II CD Rom 36>>>>>>>8 ubequad !0x5dee74ad1aa56394 37# skip few (5/41) DEGAS mid-res bitmap (GEMINI01.PI2 GEMINI02.PI2 GEMINI03.PI2 CODE_RAM.PI2 TBX_DEMO.PI2) 38# with file size 32034 39>>>>>>>>-0 offset !32034 raw G3 (Group 3) FAX, byte-padded 40# version 5.25 labeled the entry above "raw G3 data, byte-padded" 41!:mime image/g3fax 42#!:apple ????TIFF 43!:ext g3 44# unusual image starting with black pixel 45#0 short 0x1300 raw G3 (Group 3) FAX 460 short 0x1400 47# 16 0-bits near beginning like PicturePuzzler found on Golden Orchard Apple CD Rom 48>2 search/9 \0\0 49# maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3 50>2 default x 51# skip some (84/1246) MacBinary II/III (Cyberdog2.068k.smi.bin FileMakerPro4.img.bin Hypercard1.25.image.bin UsbStorage1.3.5.smi.bin) with "non random" numbers by versions values 81h/82h + 81h 52>>122 ubeshort&0xFcFf !0x8081 raw G3 (Group 3) FAX 53# version 5.25 labeled the above entry as "raw G3 data" 54!:mime image/g3fax 55!:ext g3 56# unusual image with black pixel near beginning 57#0 short 0x1900 raw G3 (Group 3) FAX 58 59# 60# Magic data for vgetty voice formats 61# (Martin Seine & Marc Eberhard) 62 63# 64# raw modem data version 1 65# 660 string RMD1 raw modem data 67>4 string >\0 (%s / 68>20 short >0 compression type %#04x) 69 70# 71# portable voice format 1 72# 730 string PVF1\n portable voice format 74>5 string >\0 (binary %s) 75 76# 77# portable voice format 2 78# 790 string PVF2\n portable voice format 80>5 string >\0 (ascii %s) 81 82# From: Bernd Nuernberger <bernd.nuernberger@web.de> 83# Brooktrout G3 fax data incl. 128 byte header 84# Common suffixes: 3??, BRK, BRT, BTR 850 leshort 0x01bb 86>2 leshort 0x0100 Brooktrout 301 fax image, 87>>9 leshort x %d x 88>>0x2d leshort x %d 89>>6 leshort 200 \b, fine resolution 90>>6 leshort 100 \b, normal resolution 91>>11 byte 1 \b, G3 compression 92>>11 byte 2 \b, G32D compression 93