The Interchange File Format (IFF) was introduced in 1985 by Electronic Arts.
This format stores files in standardised modular objects, called `chunks'.
At the start of each chunk it is specified what type of data can be expected
and what the size of this data is. This was a very forward thinking way of
storing data, similar structures are still used in modern file formats (such
as PNG images and XML files).
Although the IFF format is still in use, and new standardised chunk types can
still be registered, this package will focus on the older chunk types that
were primarily used on the Commodore Amiga (OS <= 3.0). IFF files could
contain any kind of information. It could contain bitmap images, but also
audio clips or (formatted) texts.
The IFFChunk
class is designed such that it theoretically can hold
any type of IFF data. This package will mostly focus on the early IFF file types
(i.e., IFF chunks as originally registered by Electronic Arts). IFF files are
read by this package in a none lossy way (read.iff
), such that all
information is preserved (even if it is of an unknown type, as long as the chunk
identifier is 4 characters long).
This means that the object needs to be interpreted in order to make sense out of
it (interpretIFFChunk
). This interpretation returns simplified
interpretations of class IFF.ANY
when it is supported (see
IFFChunk-method
for supported chunk types). Note that in the
interpretation process (meta-)information may get lost. converting
IFF.ANY
objects back into IFFChunk
objects (if possible)
could therefore result in an object that is different from then one stored in the
original file and could even destroy the correct interpretation of IFF objects.
IFF files should thus be handled with care.