//! Write-Ahead Logging (WAL) for data durability
//!
//! Provides crash recovery by logging all writes before they're applied.
//!
//! # Architecture
//!
//! ```text
//! Write Request --> WAL Append --> Memory Update --> (Background) Compaction
//! ```
//!
//! # File Format
//!
//! WAL files use a simple binary format:
//! - Header: magic number (4 bytes) + version (4 bytes)
//! - Entries: length (4 bytes) + checksum (4 bytes) + data (N bytes)
//! - Footer: entry count (4 bytes) + final checksum (4 bytes)

pub mod format;
pub mod writer;
pub mod reader;
pub mod compactor;

pub use format::{WALEntry, WALHeader, WALFooter, WALOperation, WAL_MAGIC, WAL_VERSION};
pub use writer::{WALWriter, WALWriterConfig, SyncMode};
pub use reader::{WALReader, WALIterator};
pub use compactor::{WALCompactor, CompactorConfig};
