HOME

TheInfoList



OR:

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 d ...
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 Extension, extend or extended may refer to: Mathematics Logic or set theory * Axiom of extensionality * Extensible cardinal * Extension (model theory) * Extension (predicate logic), the set of tuples of values that satisfy the predicate * E ...
. 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 Interleaved Bitmap (ILBM) is an image file format conforming to the Interchange File Format (IFF) standard. The format originated on the Amiga platform, and on IBM-compatible systems, files in this format or the related PBM (Planar Bitmap) form ...
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 Mi ...
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, Washing ...
and IBM in 1991 that is based on IFF, except the
byte order 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 sig ...
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 introd ...
processor architecture.
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple fruit tree, trees are agriculture, cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, wh ...
's
AIFF Audio Interchange File Format (AIFF) is an audio file format standard used for storing sound data for personal computers and other electronic audio devices. The format was developed by Apple Inc. in 1988 based on Electronic Arts' Interchange File ...
is a
big-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 sig ...
audio file format developed from IFF. The
TIFF Tag Image File Format, abbreviated TIFF or TIF, is an image file format for storing raster graphics images, popular among graphic artists, the publishing industry, and photographers. TIFF is widely supported by scanning, faxing, word process ...
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., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
called an
OSType A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
, 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 serv ...
developers might call a
FourCC A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
). 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 language ...
(all integers in IFF file structure are
big-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 sig ...
) 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 Within communication protocols, TLV (type-length-value or tag-length-value) is an encoding scheme used for optional informational elements in a certain protocol. A TLV-encoded data stream contains code related to the record type, the record val ...
(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 consider ...
(
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 of ...
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 Interleaved Bitmap (ILBM) is an image file format conforming to the Interchange File Format (IFF) standard. The format originated on the Amiga platform, and on IBM-compatible systems, files in this format or the related PBM (Planar Bitmap) form ...
,
ANIM Anim or ANIM may refer to: Places *A city in the mountains of Judah, now el-Ghuwein, near Eshtemoh, about 10 miles south-west of Hebron *An alternative spelling for the biblical city of Anem, now Jenin * Anim synagogue, a synagogue in Israel ...
an
DR2D
files (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 Interleaved Bitmap (ILBM) is an image file format conforming to the Interchange File Format (IFF) standard. The format originated on the Amiga platform, and on IBM-compatible systems, files in this format or the related PBM (Planar Bitmap) form ...
file and sound in an
8SVX 8-Bit Sampled Voice (8SVX) is an audio file format standard developed by Electronic Arts for the Commodore- Amiga computer series. It is a data subtype of the IFF file container format. It typically contains linear pulse-code modulation (LPCM ...
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 Audio Interchange File Format (AIFF) is an audio file format standard used for storing sound data for personal computers and other electronic audio devices. The format was developed by Apple Inc. in 1988 based on Electronic Arts' Interchange File ...
(a
big-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 sig ...
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 A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
(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