Content deleted Content added
mNo edit summary |
replaced stub with some content |
||
Line 1:
'''RIFF''' stands for ''Resource Interchange File Format''. It is a simple format for storing tagged data structures, introduced[1] in 1991 by [[Microsoft]] and [[IBM]].
'''RIFF''' file consist of building blocks called ''chunks''. Chunk can be described as the following [[C_language|C]] structure[2]:
struct chunk {
char id[4]; // four character code describing chunk content
unsigned long size; // length of the content, excluding id, size and padding
char data[size]; // chunk content, padded to the word boundary
};
Chunks having id of either <tt>"RIFF"</tt> or <tt>"LIST"</tt> store any number of other chunks.
<tt>"RIFF"</tt> chunk defines the whole file container. First four bytes of the chunk data form a file type identifier (eg.<tt>"AVI "</tt>[3], <tt>"WAVE"</tt> etc), after which there are chunks describing the file placed one after another.
<tt>"LIST"</tt> chunk is just an ordered collection of other chunks, for example a collection of movie frames. First four bytes of the data is a collection identifier (eg.<tt>"movi"</tt> for frame data etc), after which chunks of the collection follow.
For description of other chunk types please refer to the following Microsoft's documents:
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/mmio_2uyb.asp Resource Interchange File Format Services]
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/avirifffilereference.asp RIFF AVI file reference]
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_vb/directx_vb/htm/_dx_reading_wave_files_dxaudio.asp Reading WAVE files]
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/_dx_directmusic_file_format_dxaudio.asp DirectMusic file format]
* [http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q120253 Multimedia Registration Kit]
''Footnotes:''
# '''RIFF''' format is almost identical to [[IFF|IFF file format]] introduced earlier by Electronic Arts, and very popular mostly among [[Amiga]] users.
# All data in a '''RIFF''' file is in [[Little-endian|little-endian]] notation, thus simply dumping this structure to disk will not work on [[Big-endian|big-endian]] machines.
# Less than four character identifiers are padded with spaces.
|