Resource Interchange File Format

related topics
{system, computer, user}
{math, number, function}
{work, book, publish}
{law, state, case}
{album, band, music}

The Resource Interchange File Format (RIFF) is a generic file container format for storing data in tagged chunks.

It was introduced in 1991 by Microsoft and IBM, and was presented by Microsoft as the default format for Windows 3.1 multimedia files. It is based on Electronic Arts's Interchange File Format, introduced in 1985 on the Amiga 1000, the only difference being that multi-byte integers are in little-endian format, native to the 80x86 processor series used in IBM PCs, rather than the big-endian format native to the 68k processor series used in Amiga and Apple Macintosh computers, where IFF files were heavily used.

(The specification for AIFF, the big-endian analogue of RIFF, was published by Apple Computer in 1988.)

The Microsoft implementation is mostly known through container formats like AVI, ANI and WAV, which use RIFF as their basis.

In 2010 Google introduced the WebP picture format, which uses RIFF as a container.[1]

Contents

Explanation

RIFF files consist entirely of "chunks". The overall format is identical to IFF, except for the endianness as previously stated, and the different meaning of the chunk names.

All chunks have the following format:

  • 4 bytes: an ASCII identifier for this chunk, e.g. "fmt " or "data".
  • 4 bytes: an unsigned, little-endian 32-bit integer with the length of this chunk (except this field itself and the chunk identifier).
  • variable-sized field: the chunk data itself, of the size given in the previous field.
  • a pad byte, if the chunk's length is not even.

Full article ▸

related documents
Motorola 68000 family
JPEG 2000
Encapsulated PostScript
MX record
Forward error correction
Shareaza
MAC address
Logic analyzer
Xfce
Dynamic DNS
Speech coding
Comparator
Bit
BBC BASIC
Real-time Transport Protocol
MPEG-4
VESA BIOS Extensions
Repeater
RF modulator
NuBus
Communications system
Virtual circuit
NS320xx
Pulse dialing
GNU Hurd
Sampling rate
Context switch
Slackware
Time-sharing
Response time (technology)