forked from AbleOS/ableos_userland
59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
use types::NBitUnsignedInteger;
|
|
|
|
pub mod types;
|
|
|
|
pub const EXI_HEADER_START: &str = "$EXI";
|
|
|
|
pub struct ExiOptions {
|
|
// NOTE: Go back to the EXI spec and fix this
|
|
pub alignment: u8,
|
|
|
|
pub compression: bool,
|
|
|
|
pub strict: bool,
|
|
|
|
pub fragment: bool,
|
|
|
|
// https://www.w3.org/TR/exi/#key-preserveOption
|
|
pub preserve: bool,
|
|
|
|
// https://www.w3.org/TR/exi/#key-selfContained
|
|
pub self_contained: bool,
|
|
|
|
// https://www.w3.org/TR/exi/#key-schemaIdOption
|
|
pub schema_id: String,
|
|
|
|
// https://www.w3.org/TR/exi/#key-datatypeRepresentationOption
|
|
// NOTE: What possible usecase could you have for changing the representation of data types.
|
|
// Touching this will be UB. Cry about it.
|
|
pub datatype_representation_map: bool,
|
|
|
|
// https://www.w3.org/TR/exi/#key-blockSizeOption
|
|
pub block_size: NBitUnsignedInteger,
|
|
|
|
// https://www.w3.org/TR/exi/#key-valueMaxLengthOption
|
|
pub value_max_length: NBitUnsignedInteger,
|
|
|
|
// https://www.w3.org/TR/exi/#key-valuePartitionCapacityOption
|
|
pub value_partition_capacity: NBitUnsignedInteger,
|
|
|
|
// https://www.w3.org/TR/exi/#key-userMetaData
|
|
pub user_defined_meta_data: String,
|
|
}
|
|
|
|
pub enum ExiFormatVersion {
|
|
PreviewVersion1 = 1_0000,
|
|
// The ableOS standard
|
|
FinalVersion1 = 0_0000,
|
|
FinalVersion15 = 0_1110,
|
|
FinalVersion16 = 0_1111_0000,
|
|
FinalVersion17 = 0_1111_0001,
|
|
}
|
|
|
|
pub struct ExiHeader {
|
|
exi_format: ExiFormatVersion,
|
|
exi_options: ExiOptions,
|
|
}
|
|
|
|
pub struct ExiDocument {}
|