IFFIFF, the Interchange File Format, is a generic file format originally introduced by the Electronic Arts company in 1985 in order to ease transfer of data between software products produced by different companies.
RIFF is a variant of IFF format devised by Microsoft and IBM; RIFF files differ from IFF files in that they have letters RIFF at the beginning and use little-endian integers. The file format TIFF was invented by Aldus to include high-depth bitmaps with PostScript; it is similar to IFF, and has similar name, but is otherwise unrelated.
IFF files of course do not have any common extension. Most files with .iff extension are in fact ILBM files, wrongly named so because they are most common IFF files and most people think they are the only type of IFF files (on most systems that produce IFF files extensions are not important).
|Table of contents|
2 Some file types
3 External Link
IFF files begin with capital ASCII letters FORM, followed with a longword (all integers in IFF files' structure are big-endian) containing the size of the file after it (that is, the number of bytes that has to be read until the end of the file; typically, this is filesize-8), followed with four capital ASCII letters (numbers and space can also be used) that describe file type.
After the header, IFF files contain a stream of chunks. Each chunk also has four letters at the beginning describing its type (examples: TEXT, BODY, BMHD) followed by longword that contain the length of the chunk (that is, the number of bytes that has to be read until the end of the chunk). The next chunk need not be exactly at the end of the previous, as chunks are longword-aligned. Each type of chunk typically has different internal structure, that could be numerical data, text, or raw data. It is also possible to include other IFF files as if they are chunks (note that they have the same structure: four letters followed with length) and some formats use this. There are standard chunks that could be present in any IFF file, such as AUTH (containing text with information about author of the file), ANNO (containing text with annotation, usually name of the program that created the file), NAME (containing text with name of the work in the file), VERS (containing file version), "(c) " (containing text with copyright information). There are also chunks that are common among a number of formats, such as CMAP which holds color palette in ILBM, ANIM and DR2D files (pictures, animations and vector pictures). There are chunks that have common name but hold different data such as BODY which could store image in an ILBM file and sound in an 8SVX file. And finally, there are chunks unique to their file type. Some programs that create IFF files add to them chunks with their internal data; these same files can later be read by other programs without any disruption which is a great advantage of IFF and similar formats.
Some file types
IFF can also stand for Identification, Friend or Foe., an identification machine.