IFF-16SV



         


This article is about the file format. IFF can also stand for Identification friend or foe, a battlefield identification system, or iff in mathematics


IFF, 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.

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).

[Top]

Structure

IFF files begin with capital ASCII letters FORM, followed with a 32-bit unsigned integer (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 by a FourCC code (four capital ASCII letters, numbers or spaces) that describe file type.

After the header, IFF files contain a stream of chunks. Each chunk also has a FourCC code 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.

[Top]

List of common IFF-based file formats

[Top]

Clones and variants of the IFF format

[Top]




  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License