iff_rs 0.1.2

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

Commit Activity Crates.io Downloads (latest version) GitHub Issues or Pull Requests

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'.

Installation

Add the following to your Cargo.toml file:

[dependencies]
iff_rs = "0.1.1"

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

If you would like to contribute to this project, please fork the repository and create a pull request. If you have any questions, feel free to create an issue.

Features

  • Read Basic IFF files
  • Write to IFF files
  • Detect IFF type

Disclaimer

THIS LIBRARY IS VERY EARLY ALPHA!!! IT CANNOT WRITE OR DETECT THE TYPE OF IFF FILES AND ONLY GIVES DATA!!!