//! TEX texture decoder — parses FFXIV texture files and decompresses block-compressed surfaces.
//!
//! The central entry point is [`Tex::parse`], which borrows a byte slice and returns a zero-copy
//! view over the header and pixel data.  Individual mip/slice surfaces can then be accessed via
//! [`Tex::surface_bytes`] (raw compressed data) or [`Tex::decompress_surface`] (RGBA8 output).
//!
//! Pixel formats are described by [`TextureFormat`].  Software `BCn` decompression is handled by
//! [`decompress_to_rgba8`] in the [`bcn`] submodule (BC1–BC5); BC7 is recognised as a format but
//! has no software decompressor — [`decompress_to_rgba8`] returns an error for it.

mod bcn;
mod format;
mod header;

pub use bcn::decompress_to_rgba8;
pub use format::TextureFormat;
pub use header::{
    MAX_MIP_LEVELS, SurfaceInfo, SurfaceIter, TEX_HEADER_SIZE, Tex, TexFlags, TexHeader,
};
