pub mod endian;
pub mod raw;
+pub mod cooked;
pub mod sack;
+pub mod encoding;
#[derive(ThisError, Debug)]
pub enum Error {
#[error("Document record at offset {offset:#x} has document line count ({n}) greater than the maximum number {max}.")]
BadDocumentLength { offset: u64, n: u32, max: u32 },
- #[error("At offset {offset:#x}, Unrecognized record type {rec_type}.")]
+ #[error("At offset {offset:#x}, unrecognized record type {rec_type}.")]
BadRecordType { offset: u64, rec_type: u32 },
#[error("At offset {offset:#x}, variable label code ({code}) is not 0 or 1.")]
expected_n_blocks: u64,
ztrailer_len: u64,
},
+
+ #[error("At offset {offset:#x}, {record} has bad size {size} bytes instead of the expected {expected_size}.")]
+ BadRecordSize { offset: u64, record: String, size: u32, expected_size: u32 },
+
+ #[error("At offset {offset:#x}, {record} has bad count {count} instead of the expected {expected_count}.")]
+ BadRecordCount { offset: u64, record: String, count: u32, expected_count: u32 },
}