iff_rs 0.1.1

A rust crate for reading Amiga IFF files
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 1 items with examples
  • Size
  • Source code size: 81.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 294.8 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ggkkaa

iff_rs is a simple IFF reader library made in Rust. It reads IFF files, skips the FORM at the beginning, and returns:

  • The amount of chunks
  • A vector with all of the chunks

This is an example on how to use iff_rs, the iff file in this example has 2 chunks.

  • The FORM chunk, which is 8 bytes long, and
  • The DATA chunk, which is 4 bytes long and contains the string 'abcd'

The data in the chunks is stored as a Vec

use iff_rs::parse_iff;
use std::string::String;

fn main() {
    let file: File = File::open("sample.iff").expect("Failed to open sample IFF file");
    let iff = parse_iff(file).expect("Failed to parse IFF file");
    let chunk = &iff.chunks[0];

    println!("{:?}", from_utf8(chunk.data));
}

This code will output 'abcd'.