Interchange File Format (IFF), is a generic
container file format originally introduced by
Electronic Arts
Electronic Arts Inc. (EA) is an American video game company headquartered in Redwood City, California. Founded in May 1982 by Apple employee Trip Hawkins, the company was a pioneer of the early home computer game industry and promoted the ...
in 1985 (in cooperation with
Commodore
Commodore may refer to:
Ranks
* Commodore (rank), a naval rank
** Commodore (Royal Navy), in the United Kingdom
** Commodore (United States)
** Commodore (Canada)
** Commodore (Finland)
** Commodore (Germany) or ''Kommodore''
* Air commodore ...
) in order to facilitate transfer of data between software produced by different companies.
IFF files do not have any standard
extension. On many systems that generate IFF files, file extensions are not important (the OS stores file format metadata separately from the file name). An
.iff
extension is commonly used for
ILBM format files, which use the IFF container format.
Resource Interchange File Format
The Resource Interchange File Format (RIFF) is a generic file container format for storing data in tagged chunks. It is primarily used to store multimedia such as sound and video, though it may also be used to store any arbitrary data.
The Mic ...
is a format developed by
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
and
IBM in 1991 that is based on IFF, except the
byte order has been changed to
little-endian
In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most si ...
to match the
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was intr ...
processor architecture.
Apple
An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, where its wild ancestor, ' ...
's
AIFF is a
big-endian audio file format developed from IFF. The
TIFF image file format is unrelated.
Structure
An IFF file is built up from
chunks. Each chunk begins with what the specification calls a "Type ID" (what the
Macintosh
The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and software en ...
called an
OSType, and
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
developers might call a
FourCC). This is followed by a 32-bit signed
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
(all integers in IFF file structure are
big-endian) specifying the size of the following data (the chunk content) in bytes.
Because the specification includes explicit lengths for each chunk, it is possible for a parser to skip over chunks that it either can't or doesn't care to process.
This structure is closely related to the
type–length–value (TLV) representation.
There are predefined ''group'' chunks, with type IDs
FORM
,
LIST
and
CAT
.
[With a trailing ]space
Space is the boundless three-dimensional extent in which objects and events have relative position and direction. In classical physics, physical space is often conceived in three linear dimensions, although modern physicists usually cons ...
(ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
20h). A
FORM
chunk is like a record structure, containing a type ID (indicating the record type) followed by nested chunks specifying the record fields. A
LIST
is a factoring structure containing a series of
PROP
(property) chunks plus nested group chunks to which those properties apply. A
CAT
is just a collection of nested chunks with no special semantics. Group chunks can contain other group chunks, depending on the needs of the application. Group chunks, like their simpler counterparts, contain a length element. Skipping over a group can thus be done with a simple relative
seek operation.
Chunks must begin on even file offsets, as befits the origins of IFF on the Motorola
68000
The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Secto ...
processor, which couldn't address quantities larger than a byte on odd addresses. Thus chunks with odd lengths will be "padded" to an even byte boundary by adding a so-called "pad byte" after their regular end.
The top-level structure of an IFF file consists of exactly one of the group chunks:
FORM
,
LIST
or
CAT
, where
FORM
is by far the most common one.
Each type of chunk typically has a different internal structure, which 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 an
DR2Dfiles (pictures, animations and vector pictures). There are chunks that have a common name but hold different data such as
BODY
, which could store an 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 chunks to them with their internal data; these same files can later be read by other programs without any disruption (because their parsers could skip uninteresting chunks), which is a great advantage of IFF and similar formats.
See also
*
RIFF
A riff is a repeated chord progression or refrain in music (also known as an ostinato figure in classical music); it is a pattern, or melody, often played by the rhythm section instruments or solo instrument, that forms the basis or acc ...
(a
little-endian
In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most si ...
incompatible derivative of IFF, originally from Microsoft)
*
AIFF (a
big-endian compatible derivative of IFF, originally from Apple)
*
Interleaved Bitmap (ILBM) (a very popular IFF-based image file format)
*
PNG (a modern graphics file format with a chunk structure inspired by IFF)
*
FourCC (the chunk identification approach used by many TLV formats, including IFF, as verbose
Magic number)
*
TLV (the generic format that IFF is an example of)
Notes
References
External links
“EA IFF 85”: Standard for Interchange Format Files- the original IFF spec written by EA's Jerry Morrison (January 14, 1985)
''Standards and specs: The Interchange File Format (IFF)''- article at IBM developerworks page.
IFF Chunk RegistryIFF standard- plus source code and a listing of registered chunks and FORMs in the AmigaOS context.
{{AmigaOS
Computer file formats
AmigaOS
Amiga
MorphOS