Skip to main content

fitsio_pure/
lib.rs

1//! Pure Rust FITS file reader/writer.
2//!
3//! Parse FITS files with [`hdu::parse_fits`], then read image pixels via
4//! [`image::read_image_data`] or table columns via [`bintable`] and [`table`].
5//! Tile-compressed images (RICE_1 / GZIP_1) are handled transparently through
6//! the [`tiled`] module.
7//!
8//! The core library is `no_std`-compatible (requires `alloc`). Enable the
9//! `compat` feature for a drop-in replacement of the `fitsio` crate API.
10#![cfg_attr(not(feature = "std"), no_std)]
11#![warn(missing_docs)]
12
13extern crate alloc;
14
15/// Binary table (BINTABLE) column parsing and data extraction.
16pub mod bintable;
17/// FITS 2880-byte block utilities and constants.
18pub mod block;
19/// HDU checksum computation and encoding (CHECKSUM/DATASUM).
20pub mod checksum;
21/// Big-endian byte conversion helpers for FITS data types.
22pub mod endian;
23/// Error types used throughout the crate.
24pub mod error;
25/// Extension HDU (IMAGE/TABLE/BINTABLE) header parsing.
26pub mod extension;
27/// Top-level FITS parsing: HDU discovery and metadata extraction.
28pub mod hdu;
29/// Header card parsing and serialization.
30pub mod header;
31/// Image pixel data reading and type conversion.
32pub mod image;
33/// Minimal `Read`/`Write`/`Seek` traits for `no_std` environments.
34pub mod io;
35/// Primary HDU header parsing and construction.
36pub mod primary;
37/// ASCII table (TABLE) column parsing and data extraction.
38pub mod table;
39/// Tile-compressed image decompression (RICE_1, GZIP_1).
40pub mod tiled;
41/// FITS header value representation (integer, float, string, logical).
42pub mod value;
43
44pub use block::{BLOCK_SIZE, CARDS_PER_BLOCK, CARD_SIZE};
45pub use error::{Error, Result};
46
47/// Compatibility layer mirroring the `fitsio` crate API.
48#[cfg(feature = "compat")]
49pub mod compat;