RIFF
Resource Interchange File Format
Interchange File Format の拡張
Windowsのメディア系フォーマット
WAVファイルなどで使われている
種類("RIFF" 4バイト)、サイズ(4バイト)、データでパッケージにしたものかな
サイズで指定できるのは2GBか4GBまで
サブチャンクを持つことができる
Big-Endian は RiFX
https://learn.microsoft.com/ja-jp/windows/win32/xaudio2/resource-interchange-file-format--riff-
https://learn.microsoft.com/ja-jp/windows/win32/directshow/avi-riff-file-reference
拡張された OpenDML形式がある AVI2.0 として使われる
https://www.jmcgowan.com/odmlff2.pdf
16bit単位でpaddingが入る (奇数の場合に0x00が入る)
主にリストとチャンクの形で構成される。先頭はRIFFなLIST
先頭にあるのがFourCC識別子 FourCCとckID
FourCC
abcd は 0x64636261 と Little-Endian で表現される 並び順は abcd
ファイル先頭
4 byte FourCC RIFF
4 byte fileSize データサイズ fileType とデータの合計サイズ
4 byte fileType データデータの種類 "WAVE" など
n-4 byte (data)
チャンク
4 byte ckID タグ
4 byte ckSize データ長 n
n byte ckData データ
リスト
4 byte FourCC LIST
4 byte listSize n listType と listDataの合計サイズ
4 byte listType
n-4 byte listData
RIFF
WAVE
AVI
WAV
RMI (MIDI)
WebP
他形式
IFF (EA)
AIFF (Apple)
PNGのチャンク形式
TIFF