@@ -150,32 +150,34 @@ func Marc(raw []byte, limit uint32) bool {
150
150
}
151
151
152
152
// Glb matches a glTF model format file.
153
- // GLB is the binary file format representation of 3D models save in
153
+ // GLB is the binary file format representation of 3D models saved in
154
154
// the GL transmission Format (glTF).
155
- // see more: https://docs.fileformat.com/3d/glb/
156
- // https://www.iana.org/assignments/media-types/model/gltf-binary
157
- // GLB file format is based on little endian and its header structure
158
- // show below:
155
+ // GLB uses little endian and its header structure is as follows:
159
156
//
160
- // <-- 12-byte header -->
161
- // | magic | version | length |
162
- // | (uint32) | (uint32) | (uint32) |
163
- // | \x67\x6C\x54\x46 | \x01\x00\x00\x00 | ... |
164
- // | g l T F | 1 | ... |
157
+ // <-- 12-byte header -->
158
+ // | magic | version | length |
159
+ // | (uint32) | (uint32) | (uint32) |
160
+ // | \x67\x6C\x54\x46 | \x01\x00\x00\x00 | ... |
161
+ // | g l T F | 1 | ... |
162
+ //
163
+ // Visit [glTF specification] and [IANA glTF entry] for more details.
164
+ //
165
+ // [glTF specification]: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
166
+ // [IANA glTF entry]: https://www.iana.org/assignments/media-types/model/gltf-binary
165
167
var Glb = prefix ([]byte ("\x67 \x6C \x54 \x46 \x02 \x00 \x00 \x00 " ),
166
168
[]byte ("\x67 \x6C \x54 \x46 \x01 \x00 \x00 \x00 " ))
167
169
168
170
// TzIf matches a Time Zone Information Format (TZif) file.
169
171
// See more: https://tools.ietf.org/id/draft-murchison-tzdist-tzif-00.html#rfc.section.3
170
172
// Its header structure is shown below:
171
- // +---------------+---+
172
- // | magic (4) | <-+-- version (1)
173
- // +---------------+---+---------------------------------------+
174
- // | [unused - reserved for future use] (15) |
175
- // +---------------+---------------+---------------+-----------+
176
- // | isutccnt (4) | isstdcnt (4) | leapcnt (4) |
177
- // +---------------+---------------+---------------+
178
- // | timecnt (4) | typecnt (4) | charcnt (4) |
173
+ // +---------------+---+
174
+ // | magic (4) | <-+-- version (1)
175
+ // +---------------+---+---------------------------------------+
176
+ // | [unused - reserved for future use] (15) |
177
+ // +---------------+---------------+---------------+-----------+
178
+ // | isutccnt (4) | isstdcnt (4) | leapcnt (4) |
179
+ // +---------------+---------------+---------------+
180
+ // | timecnt (4) | typecnt (4) | charcnt (4) |
179
181
func TzIf (raw []byte , limit uint32 ) bool {
180
182
// File is at least 44 bytes (header size).
181
183
if len (raw ) < 44 {
0 commit comments