modem 3.4 KB

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