//! # archmeld
//!
//! Secure, memory-safe, type-safe CLI for multi-format archive extraction,
//! inspection and decompression.
//!
//! Integrates functionality inspired by:
//! - `archive` crate (unified archive extraction)
//! - `lz4_decompress` (pure Rust LZ4 decompression)
//! - `sit-rs` (`StuffIt` archive reading)
//! - `cpt-rs` (Compact Pro archive reading)
//! - `gzinspector` (gzip file analysis)

#![allow(clippy::cast_possible_truncation)]
#![allow(clippy::struct_excessive_bools)]
#![allow(clippy::too_many_lines)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::items_after_statements)]
#![allow(clippy::unnecessary_wraps)]
#![allow(clippy::match_same_arms)]
#![allow(clippy::option_if_let_else)]
#![allow(clippy::unused_self)]

mod archive;
mod cli;
mod cpt;
mod error;
mod format;
mod gzinspect;
mod lz4;
mod sit;

use std::process::ExitCode;

fn main() -> ExitCode {
    match cli::run() {
        Ok(()) => ExitCode::SUCCESS,
        Err(e) => {
            eprintln!("Error: {e:#}");
            ExitCode::FAILURE
        },
    }
}
