RIFF file format reader and writer