Binary file formats
RIFF chunk size planner
Calculate word padding, total file size and the RIFF size field.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Each subchunk uses an 8-byte header, its payload, and one pad byte if the payload size is odd. Add the 12-byte RIFF/type header.
Payloads of 16 and 5 bytes use 12 + 24 + 14 = 50 bytes; the RIFF size field is 42.
Limits
Classic RIFF only, not RF64. Nested LIST chunks must be supplied as their already-computed payload size.