Skip to main content

manifold/
lib.rs

1//! Manifold: lossless RGB8 shared-patch-atlas image codecs (MNF5/6/7/8).
2//!
3//! Entry points:
4//! - [`codec`]: MNF5 (v0.5 format) encode/decode; [`codec::DecodeLimits`].
5//! - [`mnf6`]: MNF6/7 (zstd container, planar, YCoCg, color modes) —
6//!   [`mnf6::encode_mnf7`]/[`mnf6::decode_mnf7`] + configurable ceilings
7//!   ([`mnf6::decode_mnf7_with_limits`]).
8//! - [`mnf8`]: MNF8 (backend byte: zlib/zstd-19, planar, FLAG_PRED_MED,
9//!   balanced|maximum profiles) — [`mnf8::encode_mnf8`]/[`mnf8::decode_mnf8`].
10//! - [`refdecode`]: independent MNF5 decoder used by the differential tests.
11//! - [`error`]: the shared error/`Result` type for every fallible op.
12//!
13//! Decoding is deterministic integer arithmetic (no float, no allocation
14//! beyond the pixel buffer). Formats are frozen at v1.x; malformed input
15//! returns [`error::Error::Format`], never a panic.
16#![warn(missing_docs)]
17/// MNF5 (v0.5 format): atlas codec, zlib container.
18pub mod codec;
19/// Shared error and `Result` types for the whole library.
20pub mod error;
21/// Image-I/O shims (JPEG/PNG load, PNG save) — `image-io` feature.
22#[cfg(feature = "image-io")]
23pub mod img;
24/// MNF6/7: zstd container, planar packing, YCoCg + modular color modes. `decode_mnf7` accepts both magics.
25pub mod mnf6;
26/// MNF8: versioned backend-byte container (zlib/zstd-19), profiles, `FLAG_PRED_MED`.
27pub mod mnf8;
28/// Independent MNF5 decoder (differential-testing instrument).
29pub mod refdecode;