RIFF Forms

A RIFF form is a chunk with a “RIFF” chunk ID. The term also refers to a file format that follows the RIFF framework. The following lists currently registered RIFF forms. Each is described later in this document.

Form Type Description

PAL Palette File Format
RDIB RIFF Device Independent Bitmap Format
RMID RIFF MIDI Format
RMMP RIFF Multimedia Movie File Format
WAVE Waveform Audio Format

Using the notation for representing a chunk, a RIFF form looks like the following:

RIFF ( <formType> <ck>... )

The first four bytes of a RIFF form make up a chunk ID with values `R' `I' `F' `F'. The chunk size (ckSize) field is required, but for simplicity it is omitted from the notation.

Note:

RIFF has a counterpart, RIFX, that you can use to define RIFF file formats that use the Motorola integer byte-ordering format rather than the Intel format. A RIFX form is the same as a RIFF form, except that the first four bytes contain the character sequence `R' `I' `F' `X' rather than RIFF. Integer byte ordering is represented in Motorola format.

The first DWORD of chunk data in the “RIFF” chunk (shown above as <formType>) is a four-character code value identifying the data representation, or form type, of the file. Following the form-type code is a series of subchunks. Which subchunks are present depends on the form type. The definition of a particular RIFF form typically includes the following:

A unique four-character code identifying the form type

A list of mandatory chunks

A list of optional chunks

Possibly, a required order for the chunks