Skip to main content

euv_docs/codec/
enum.rs

1/// Typed failure taxonomy for `euv-docs` payload compression and site bundle unpacking.
2#[derive(Clone, Debug, Eq, PartialEq)]
3pub enum DocsCodecError {
4    /// The stream does not start with the `EUVZ` magic prefix.
5    BadMagic,
6    /// The stream declares an unsupported format version.
7    UnsupportedVersion(u8),
8    /// The stream ended before all declared data was decoded.
9    Truncated,
10    /// A block header carries an over-subscribed or empty Huffman code.
11    InvalidCodeLengths,
12    /// The bit stream contains a symbol that maps to no valid code.
13    InvalidSymbol,
14    /// A back-reference points before the start of the decoded output.
15    InvalidDistance,
16    /// The decoded byte count does not match the declared original length.
17    LengthMismatch,
18    /// The packed page list does not align with the plaintext page index.
19    PageCountMismatch,
20    /// The shell JSON or decoded page JSON failed to (de)serialize.
21    InvalidPayload(String),
22}