Iff
Interchange File Format
Interchange File Format (IFF) is a file format that stores a series of chunks, each tagged with what they are.
- To the low-level file parser, each chunk is simple and separate, though the thing on top of it may make things more complex
Originally introduced by Electronic Arts in 1985 (that specification can be referred to as EA IFF 85).
The file is big-endian (native to Macs and Amigas of the time), which is a little extra work on the little-endian x86.
There are various mild variations, a few derivative formats, and a few that formats that just happen to use a very similar chunking scheme just because it is a fairly obvious thing to do if you want to store more than one thing in one file.
Used in/for things like:
- Audio Interchange File Format (AIFF/AIFF-C)
- DjVu
- WebP
- 8SVX ('8-Bit Sampled Voice')
- Real Media File Format (RMFF)
Similar but not directly compatible:
- Microsoft's RIFF
- seems to just be little-endian IFF?(verify)
- the basis of WAV files (storing PCM sound), ANI (icons), AVI (video), and a bunch more
- MIDI uses a similar setup
- Microsoft's .RMI is MIDI wrapped in RIFF - which adds an extra layer of tagging which... is usually more confusing than it is useful
- Nero's NRG images
Note: TIFF is not IFF-based, although it does have a similar approach(verify)
There are many other formats that follow a similar concept -- The concept of TLV is useful to mention here.
See also:
If and only if
Iff is a shorthand for if and only if, reglarly used in logic, theorems, and predicates elsewhere.
In a predicate-logic sense, 'if', 'only if', and 'if and only if' this is the distinction between
- a ⇒ b
- a ⇐ b
- also written as b ⇒ a
- a ⇒ b and a ⇐ b
- also written as a ⇔ b
This refers to strict first-order predicate stuff.
'if and only if' in everyday language may just mean "if-probably-then but I really mean it", which is not the same, and potentially confusing (also because real-world context varies in how much it hints at a more or less strenuous interpretation).
(more typing up elsewhere)