sf3 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #------------------------------------------------------------------------------
  2. # $File: sf3,v 1.1 2025/06/27 15:13:53 christos Exp $
  3. # sfr: SF3 [Simple File Format Family] files
  4. # (Yukari Hafner, shinmera@tymoon.eu)
  5. #
  6. # Reference: https://shirakumo.org/docs/sf3
  7. # Samples: https://shirakumo.org/projects/sf3/tree/master/samples/
  8. 0 name SF3-archive
  9. >0 ulequad x \b, %llu files
  10. !:mime application/x.sf3-archive
  11. 0 name SF3-audio
  12. >0 ulelong >1 \b, %dHz
  13. >4 ubyte >0 \b, %d channels
  14. >5 byte 0x01 \b, A-law
  15. >5 byte 0x02 \b, 16-bit signed PCM
  16. >5 byte 0x04 \b, 32-bit signed PCM
  17. >5 byte 0x08 \b, 64-bit signed PCM
  18. >5 byte 0x11 \b, u-law
  19. >5 byte 0x12 \b, 16-bit unsigned PCM
  20. >5 byte 0x14 \b, 32-bit unsigned PCM
  21. >5 byte 0x18 \b, 64-bit unsigned PCM
  22. >5 byte 0x22 \b, half-float PCM
  23. >5 byte 0x24 \b, single-float PCM
  24. >5 byte 0x28 \b, double-float PCM
  25. !:mime audio/x.sf3
  26. 0 name SF3-image
  27. >0 ulelong >0 \b, %d
  28. >4 ulelong >0 \bx%d
  29. >8 ulelong >0 \bx%d
  30. >12 byte 0x01 \b, grayscale
  31. >12 byte 0x02 \b, grayscale-alpha
  32. >12 byte 0x03 \b, RGB
  33. >12 byte 0x04 \b, RGBA
  34. >12 byte 0x12 \b, grayscale-alpha
  35. >12 byte 0x13 \b, BGR
  36. >12 byte 0x14 \b, ABGR
  37. >12 byte 0x24 \b, ARGB
  38. >12 byte 0x34 \b, BGRA
  39. >12 byte 0x44 \b, CMYK
  40. >12 byte 0x54 \b, KYMC
  41. >13 byte 0x01 \b, 8-bit signed
  42. >13 byte 0x02 \b, 16-bit signed
  43. >13 byte 0x04 \b, 32-bit signed
  44. >13 byte 0x08 \b, 64-bit signed
  45. >13 byte 0x11 \b, 8-bit unsigned
  46. >13 byte 0x12 \b, 16-bit unsigned
  47. >13 byte 0x14 \b, 32-bit unsigned
  48. >13 byte 0x18 \b, 64-bit unsigned
  49. >13 byte 0x22 \b, half-float
  50. >13 byte 0x24 \b, single-float
  51. >13 byte 0x28 \b, double-float
  52. !:mime image/x.sf3
  53. 0 name SF3-log
  54. >0 leqdate x \b, from %s
  55. >8 leqdate x \b, to %s
  56. >16 uleshort x \b, %d chunks
  57. !:mime application/x.sf3-log
  58. 0 name SF3-model
  59. >(2.l+22) ulelong x \b, %d face indices
  60. >>&(&-20.l*4) ulelong x \b, %d vertex attributes
  61. !:mime model/x.sf3
  62. 0 name SF3-physics-model
  63. >0 lefloat x \b, %f kg
  64. >40 uleshort x \b, %d shapes
  65. !:mime model/x.sf3-physics
  66. 0 name SF3-table
  67. >0 uleshort x \b, %d columns
  68. >10 ulequad x \b, %llu rows
  69. !:mime application/x.sf3-table
  70. 0 name SF3-text
  71. >8 ulelong x \b, %d markup options
  72. >(0.q+28) ulequad x \b, %llu bytes of text
  73. !:mime application/x.sf3-text
  74. 0 name SF3-vector-graphic
  75. >0 ulelong >0 \b, %d
  76. >4 ulelong >0 \bx%d
  77. >8 ulelong x \b, %d instructions
  78. !:mime image/x.sf3-vector
  79. # Generic SF3 Header
  80. 0 string \x81SF3\x00\xE0\xD0\x0D\x0A\x0A SF3
  81. >10 byte 0x01 archive
  82. >>16 use SF3-archive
  83. >10 byte 0x02 audio file
  84. >>16 use SF3-audio
  85. >10 byte 0x03 image file
  86. >>16 use SF3-image
  87. >10 byte 0x04 log file
  88. >>16 use SF3-log
  89. >10 byte 0x05 3D model
  90. >>16 use SF3-model
  91. >10 byte 0x06 physics model
  92. >>16 use SF3-physics-model
  93. >10 byte 0x07 table
  94. >>16 use SF3-table
  95. >10 byte 0x08 text file
  96. >>16 use SF3-text
  97. >10 byte 0x09 vector graphic
  98. >>16 use SF3-vector-graphic
  99. >10 byte >9 file of unknown type (%d)
  100. !:mime application/x.sf3
  101. !:ext sf3