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