RIFF notes

From Helpful
Jump to navigation Jump to search
This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


A TLV-style affair, and broadly RIFF is just little-endian variant on IFF, though it effectively has its own chunk types.

Classical RIFF uses 32-bit sizes so there is a 4GiByte limit, there is a derived format called RF64 that extends that to 64-bit.


A RIFF chunk is basically

  • 4 bytes of chunk id (following FourCC(verify))
  • (little endian?) uint32 size of payload data size
  • that amount of payload bytes

RIFF specs allow nesting, in that a chunk's data could contain a series of chunks. Per specs, a top-level RIFF chunk can do this, and contained LIST chunks can (and LISTs in LISTs, though three levels is as far as most formats go).


Note that each RIFF-based file format will describe what is stored, and each will effectively restrict what the core RIFF format allows.