riff-reader
RIFF (Resource Interchange File Format) file reader.
see https://msdn.microsoft.com/en-us/library/windows/desktop/dd798636(v=vs.85).aspx
Installation
npm install riff-reader --save
Usage
var reader = ; ; // you can also use buffer.var buffer = fs; ;
API
reader(file, formType)
create new reader instance.
file
Type: String
or instance of Buffer
The file path or buffer of file content.
formType
Type: String
The form type of the RIFF content.
reader.readSync(callback, [subscribeIds])
read file synchronously.
callback
Type: function(id, data)
id
Type: String
The chunk ID.
data
Type: instance of Buffer
The buffer of chunk data content. id and size are not contained.
subscribeIds
Type: array of String
, Optional, Default: all chunks.
The array of chunk id to read for.
TODO
- asynchronous read operation