The Resource Interchange File Format (RIFF) is a generic file container format for storing data in tagged chunks. It is primarily used to store multimedia such as sound and video, though it may also be used to store any arbitrary data.
This crate provides utility methods for reading and writing formats such as Microsoft Wave, Audio Video Interleave or Downloadable Sounds.
Please see the tests to see how to use it.
I plan to add many, many features to this crate. I hope it will become the de facto way to parse RIFF files in Rust :) -- one can dream.
I am planning on working on:
-
Complete propagation of errors. A library ought to never panics. Every possible errors should propagate back to the user of this library inRiffError
. This also means thatRiffError
needs to be a LOT more robust. -
Ability to dynamically construct RIFF files and write to the machine. -
A clean implementation of the lazy version. Because a typeT
that satisfyRead + Seek
must be mutable to do anything. Getting this to work nicely is quite hard because only 1 mutable reference toT
can exist at any one time. However, because we are recursively parsing through the file, it complains that it cannot infer the lifetime ofT
. -
Unify the interface of the 2 versions under a trait.
-
Conversion from each of these representations.
This is a fork of the original library with major changes (practically a rewrite of the entire thing). Provides a cleaner interface, and an option to read the file eagerly.