1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Manifold: lossless RGB8 shared-patch-atlas image codecs (MNF5/6/7/8).
//!
//! NOTE on names: the published *package* is `manifold-codec`, but the lib
//! target is `manifold` (the original crate name, kept for path stability).
//! Depend on `manifold-codec` in Cargo.toml and import as `manifold`:
//!
//! ```toml
//! [dependencies]
//! manifold-codec = "1.3"
//! ```
//! ```no_run
//! use manifold::codec::Dims;
//! ```
//! Entry points:
//! - [`codec`]: MNF5 (v0.5 format) encode/decode; [`codec::DecodeLimits`].
//! - [`mnf6`]: MNF6/7 (zstd container, planar, YCoCg, color modes) —
//! [`mnf6::encode_mnf7`]/[`mnf6::decode_mnf7`] + configurable ceilings
//! ([`mnf6::decode_mnf7_with_limits`]).
//! - [`mnf8`]: MNF8 (backend byte: zlib/zstd-19, planar, FLAG_PRED_MED,
//! balanced|maximum profiles) — [`mnf8::encode_mnf8`]/[`mnf8::decode_mnf8`].
//! - [`refdecode`]: independent MNF5 decoder used by the differential tests.
//! - [`error`]: the shared error/`Result` type for every fallible op.
//!
//! Decoding is deterministic integer arithmetic (no float, no allocation
//! beyond the pixel buffer). Formats are frozen at v1.x; malformed input
//! returns [`error::Error::Format`], never a panic.
/// MNF5 (v0.5 format): atlas codec, zlib container.
/// Shared error and `Result` types for the whole library.
/// Image-I/O shims (JPEG/PNG load, PNG save) — `image-io` feature.
/// MNF6/7: zstd container, planar packing, YCoCg + modular color modes. `decode_mnf7` accepts both magics.
/// MNF8: versioned backend-byte container (zlib/zstd-19), profiles, `FLAG_PRED_MED`.
/// Independent MNF5 decoder (differential-testing instrument).