|
8 | 8 | */ |
9 | 9 |
|
10 | 10 | // A Container Format is a file that embeds multiple data streams into a single file. |
11 | | -// Relevant examples: |
| 11 | +// Examples: |
12 | 12 | // 1) the ISO-BMFF family (MP4, HEVC, AVIF, MOV/QT, etc) |
13 | 13 | // 2) the Matroska family (MKV, WebM) |
14 | 14 | // 3) the RIFF family (WAV, AVI, WebP) |
@@ -66,6 +66,10 @@ const fileSignatures = { |
66 | 66 | ], |
67 | 67 | 'audio/wav': [[0x52, 0x49, 0x46, 0x46, '??', '??', '??', '??', 0x57, 0x41, 0x56, 0x45]], // 'RIFF....WAVE' |
68 | 68 | 'video/avi': [[0x52, 0x49, 0x46, 0x46, '??', '??', '??', '??', 0x41, 0x56, 0x49, 0x20]], // 'RIFF....AVI ' |
| 69 | + |
| 70 | + // Miscellaneous. |
| 71 | + 'font/woff': [[0x77, 0x4F, 0x46, 0x46]], // 'wOFF' |
| 72 | + 'font/woff2': [[0x77, 0x4F, 0x46, 0x32]], // 'wOF2' |
69 | 73 | }; |
70 | 74 |
|
71 | 75 | // TODO: Eventually add support for various container formats so that: |
@@ -102,7 +106,7 @@ let maxDepth = 0; |
102 | 106 | export function initialize() { |
103 | 107 | root = new Node(); |
104 | 108 |
|
105 | | - // Construct the tree, erroring if overlapping mime types are possible. |
| 109 | + // Construct the tree, erroring if overlapping mime types are found. |
106 | 110 | for (const mimeType in fileSignatures) { |
107 | 111 | for (const signature of fileSignatures[mimeType]) { |
108 | 112 | let curNode = root; |
|
0 commit comments