use crate::parser::cfb_reader::{CfbError, CfbReader};
pub const EXIT_OK: i32 = 0;
pub const EXIT_RUNTIME: i32 = 1;
pub const EXIT_USAGE: i32 = 2;
pub(crate) const MAX_HWP5_DIAGNOSTIC_STREAM_OUTPUT_BYTES: usize = 256 * 1024 * 1024;
pub(crate) fn read_hwp5_doc_info_limited(
cfb: &mut CfbReader,
compressed: bool,
max_bytes: usize,
) -> Result<Vec<u8>, CfbError> {
cfb.read_doc_info_limited(compressed, max_bytes)
}
pub(crate) fn read_hwp5_body_text_section_limited(
cfb: &mut CfbReader,
index: u32,
compressed: bool,
distribution: bool,
max_bytes: usize,
) -> Result<Vec<u8>, CfbError> {
if distribution {
cfb.read_viewtext_section_raw_limited(index, max_bytes)
} else {
cfb.read_body_text_section_limited(index, compressed, max_bytes)
}
}
pub mod bench;
pub mod core_pages_probe;
pub mod hwp5_anchor_trace;
pub mod hwp5_borderfill_diagonal_probe;
pub mod hwp5_cell_header_probe;
pub mod hwp5_char_shape_audit;
pub mod hwp5_contract_analyze;
pub mod hwp5_contract_probe;
pub mod hwp5_ctrl_data_trace;
pub mod hwp5_first_para_control_probe;
pub mod hwp5_inventory;
pub mod hwp5_inventory_diff;
pub mod hwp5_mel_personnel_probe;
pub mod hwp5_roundtrip_batch;
pub mod hwp5_table_probe;
pub mod hwpx_roundtrip_batch;
pub mod ir_field_sweep;
pub mod layout_anomaly;
pub mod perf_counters;
pub mod render_geom_diff;
pub mod text_width_probe;