A LIST chunk is a chunk that holds other chunks. With the list type
INFO it holds the file’s text tags: one small chunk per tag, each a
four-letter ID and a string. It comes from the 1991 RIFF specification and works the same
in RIFX files, with the sizes big-endian; the text itself is not affected by byte
order.
Fields
Offsets are from the start of the chunk. Numbers are big-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | char[4] | ckID | LIST |
| 4 | 4 | u32 | ckSize | the size of everything after this field |
| 8 | 4 | char[4] | listType | INFO for tags, adtl for cue point labels |
| 12 | varies | chunks | tags | tag chunks, laid out below, one after another |
Each tag is a chunk of its own:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| +0 | 4 | char[4] | ID | the tag, such as INAM |
| +4 | 4 | u32 | size | the length of the text, including its NUL, not counting the pad byte; big-endian |
| +8 | size | char[] | text | the text, ending in a NUL |
| +8+size | 0 or 1 | u8 | pad | a zero byte when the size is odd |
Text encoding
The specification’s CSET chunk can give the code page, country, language
and dialect of the file’s text; without it the
defaults are ISO 8859-1, USA and US English. Few files carry one. The explorer reads
text as UTF-8 when it is valid UTF-8, and as Windows-1252 otherwise.
An example
The RIFF reference’s example written in RIFX byte order, built for this page: only the two sizes change.
00000000 4C 49 53 54 00 00 00 12 49 4E 46 4F 49 4E 41 4D LIST....INFOINAM
00000010 00 00 00 05 53 6F 6E 67 00 00 ....Song..
The tag INAM has a size of 5 (00 00 00 05): the four letters
of Song and the NUL. Five is odd, so a pad byte follows. The list’s size,
18 (00 00 00 12), counts the list type (4), the tag’s header (8), its text
(5) and the pad byte (1).