| Crates.io | tx2-iff |
| lib.rs | tx2-iff |
| version | 0.1.0 |
| created_at | 2025-12-03 01:09:38.362724+00 |
| updated_at | 2025-12-03 01:09:38.362724+00 |
| description | PPF-IFF (Involuted Fractal Format) - Image codec using Physics-Prime Factorization, 360-prime quantization, and symplectic warping |
| homepage | https://github.com/IreGaddr/tx2-iff |
| repository | https://github.com/IreGaddr/tx2-iff |
| max_upload_size | |
| id | 1963113 |
| size | 328,691 |
TX2-IFF is a next-generation image compression codec built on the principles of Physics-Prime Factorization (PPF) and Symplectic Geometry. It is designed to achieve high compression ratios for complex, high-entropy images by storing the generators of the image content rather than the content itself.
Add this to your Cargo.toml:
[dependencies]
tx2-iff = "0.1.0"
use tx2_iff::encoder::{Encoder, EncoderConfig};
use image::io::Reader as ImageReader;
fn main() {
let img = ImageReader::open("input.png").unwrap().decode().unwrap();
let rgb = img.to_rgb8();
let config = EncoderConfig::default();
let encoder = Encoder::new(config);
let iff_data = encoder.encode(&rgb, img.width(), img.height()).unwrap();
std::fs::write("output.iff", iff_data).unwrap();
}
use tx2_iff::format::IffImage;
use tx2_iff::decoder::{Decoder, DecoderConfig};
fn main() {
let data = std::fs::read("output.iff").unwrap();
let iff_image = IffImage::from_bytes(&data).unwrap();
let decoder = Decoder::new(DecoderConfig::default());
let rgb_pixels = decoder.decode(&iff_image).unwrap();
// Use rgb_pixels...
}
This crate includes a viewer binary that uses tx2-core to display .iff files.
cargo run --bin viewer --features gpu -- <path_to_image.iff>
MIT