modem 2.9 KB

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