4 releases

0.2.0 Apr 3, 2024
0.1.2 Sep 25, 2021
0.1.1 Sep 12, 2021
0.1.0 Sep 12, 2021

#1824 in Parser implementations

Download history 54/week @ 2024-02-04 17/week @ 2024-02-11 1/week @ 2024-02-18 22/week @ 2024-02-25 2/week @ 2024-03-03 61/week @ 2024-03-10 9/week @ 2024-03-17 99/week @ 2024-03-24 173/week @ 2024-03-31 65/week @ 2024-04-07 27/week @ 2024-04-14 70/week @ 2024-04-21 36/week @ 2024-04-28 48/week @ 2024-05-05

183 downloads per month

MIT license

12KB
229 lines

riff-io

crates.io

Rust crate for reading and writing Resource Interchange File Format (RIFF) files, such as Audio Video Interleave (AVI) and Waveform Audio File Format (WAV).

Looking For New Maintainers

I am no longer maintaining this crate and would be happy to transfer it to new maintainers.

Features

  • Provides access to file metadata containing the file structure (lists and chunks)
  • Ability to read bytes from any position in the file
  • Uses memory-mapped files for efficiency.
  • Cross-platform: Tested on Windows, Mac, and Linux.

Example

The example shows the file structure of the specified RIFF file.

cargo run --example view example.AVI

Sample output:

LIST 'hdrl'
  CHUNK 'avih' offset=32 size=56
  LIST 'strl'
    CHUNK 'strh' offset=108 size=56
    CHUNK 'strf' offset=172 size=1064
    CHUNK 'indx' offset=1244 size=32248
  LIST 'odml'
    CHUNK 'dmlh' offset=33512 size=248
CHUNK 'JUNK' offset=33768 size=12
LIST 'movi'
  CHUNK 'ix00' offset=33800 size=32248
  CHUNK '00db' offset=66056 size=3818112
  CHUNK 'JUNK' offset=3884176 size=368
  ...
  CHUNK '00db' offset=164261384 size=3818112
  CHUNK 'JUNK' offset=168079504 size=368
CHUNK 'idx1' offset=168079880 size=1528

Resources

Dependencies

~165KB