| Crates.io | iff_rs |
| lib.rs | iff_rs |
| version | 0.1.2 |
| created_at | 2025-03-22 06:12:59.659285+00 |
| updated_at | 2025-03-22 09:57:11.792337+00 |
| description | A rust crate for reading Amiga IFF files |
| homepage | |
| repository | https://github.com/ggkkaa/iff_rs |
| max_upload_size | |
| id | 1601570 |
| size | 84,741 |
iff_rs is a simple IFF reader library made in Rust. It reads IFF files, skips the FORM at the beginning, and returns:
This is an example on how to use iff_rs, the iff file in this example has 2 chunks.
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'.
Add the following to your Cargo.toml file:
[dependencies]
iff_rs = "0.1.1"
This project is licensed under the MIT License. See the LICENSE file for details.
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.
THIS LIBRARY IS VERY EARLY ALPHA!!! IT CANNOT WRITE OR DETECT THE TYPE OF IFF FILES AND ONLY GIVES DATA!!!