Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interchange File Format
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Container file format introduced by Electronic Arts and Commodore}} {{More citations needed|date=September 2020}} {{Infobox file format | name = Interchange File Format | icon = | logo = | screenshot = | caption = | extension = | mime = | type code = | uniform type = | magic = | owner = [[Electronic Arts]], [[Commodore International|Commodore]] | released = {{Start date and age|1985}} | latest release version = | latest release date = | genre = [[Digital container format]] | container for = | contained by = | extended from = | extended to = | standard = | url = }} '''Interchange File Format''' ('''IFF''') is a generic [[container format (digital)|digital container file format]] originally introduced by [[Electronic Arts]] (in cooperation with [[Commodore International|Commodore]]) in 1985 to facilitate transfer of data between software produced by different companies. IFF files do not have any standard [[filename extension]]. On many systems that generate IFF files, file extensions are not important because the [[operating system]] stores [[file format]] [[metadata]] separately from the [[file name]]. The <code>.iff</code> filename extension is commonly used for the [[ILBM]] [[image file format]], which uses the IFF container format. [[Resource Interchange File Format]] is a format developed by [[Microsoft]] and [[IBM]] in 1991 that is based on IFF, except the [[byte order]] has been changed to [[little-endian]] to match the [[x86]] [[microprocessor]] architecture. [[Apple Computer|Apple]]'s [[Audio Interchange File Format]] (AIFF) is a [[big-endian]] [[audio file format]] developed from IFF. The [[TIFF]] image file format is not related to IFF. ==Structure== An IFF file is built up from [[Chunk (information)|chunk]]s. Each chunk begins with what the specification calls a "Type ID" (what the [[Macintosh]] called an [[OSType]], and [[Windows]] developers might call a [[FourCC]]). This is followed by a 32-bit signed [[integer]] (all integers in IFF file structure are [[big-endian]]) specifying the size of the following data (the chunk content) in bytes.<ref>{{cite web|last1=Reddy|first1=Martin|title='EA IFF 85' Standard for Interchange Format Files|url=http://www.martinreddy.net/gfx/2d/IFF.txt|website=martinreddy.net|access-date=8 April 2015|date=14 January 1985}}</ref> 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 <code>FORM</code>, <code>LIST</code> and <code>CAT </code>.<ref group='NB'>With a trailing [[Space (punctuation)|space]] ([[ASCII]] 20h).</ref> A <code>FORM</code> chunk is like a record structure, containing a type ID (indicating the record type) followed by nested chunks specifying the record fields. A <code>LIST</code> is a factoring structure containing a series of <code>PROP</code> (property) chunks plus nested group chunks to which those properties apply. A <code>CAT </code> 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 [[fseek|seek operation]]. Chunks must begin on even file offsets, as befits the origins of IFF on the Motorola [[68000]] 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: <code>FORM</code>, <code>LIST</code> or <code>CAT </code>, where <code>FORM</code> 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 <code>AUTH</code> (containing text with information about author of the file), <code>ANNO</code> (containing text with annotation, usually name of the program that created the file), <code>NAME</code> (containing text with name of the work in the file), <code>VERS</code> (containing file version), <code>(c) </code> (containing text with copyright information). There are also chunks that are common among a number of formats, such as <code>CMAP</code>, which holds color palette in [[ILBM]], [[ANIM]] and [https://wiki.amigaos.net/wiki/DR2D_IFF_2-D_Objects DR2D] files (pictures, animations and vector pictures). There are chunks that have a common name but hold different data such as <code>BODY</code>, 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== * [[Audio Interchange File Format|AIFF]] (a [[big-endian]] compatible derivative of IFF, originally from Apple) * [[FourCC]] (the chunk identification approach used by many TLV formats, including IFF, as verbose [[Magic number (programming)#Format indicator|Magic number]]) * [[ILBM|Interleaved Bitmap (ILBM)]] (a very popular IFF-based image file format) * [[Portable Network Graphics|PNG]] (a modern graphics file format with a chunk structure inspired by IFF) * [[Resource Interchange File Format|RIFF]] (a [[little-endian]] incompatible derivative of IFF, originally from Microsoft) * [[Type–length–value|TLV]] (the generic format that IFF is an example of) ==Notes== {{Reflist|group='NB'}} ==References== {{Reflist}} ==External links== *[http://www.martinreddy.net/gfx/2d/IFF.txt “EA IFF 85”: Standard for Interchange Format Files] - the original IFF spec written by EA's Jerry Morrison (January 14, 1985) *[http://www.ibm.com/developerworks/library/pa-spec16/ ''Standards and specs: The Interchange File Format (IFF)''] - article at IBM developerworks page. *[http://lclevy.free.fr/amiga/formats.html Page about Amiga files formats and IFF variants] *[http://wiki.amigaos.net/wiki/IFF_FORM_and_Chunk_Registry IFF Chunk Registry] *[http://wiki.amigaos.net/wiki/IFF_Standard IFF standard] - plus source code and a listing of registered chunks and FORMs in the AmigaOS context. {{Compression formats}} {{AmigaOS}} [[Category:Computer file formats]] [[Category:AmigaOS]] [[Category:Amiga]] [[Category:MorphOS]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:AmigaOS
(
edit
)
Template:Cite web
(
edit
)
Template:Compression formats
(
edit
)
Template:Infobox file format
(
edit
)
Template:More citations needed
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)