use crate::*;
fn reverse<T>(func: impl Fn([u8; 8]) -> T) -> impl Fn([u8; 8]) -> T {
move |mut bytes| {
bytes.reverse();
func(bytes)
}
}
#[bitfield(bits = 64)]
#[derive(BinRead, Debug)]
#[br(map = reverse(Self::from_bytes))]
pub struct IncompatibleFeatures {
pub dirty: bool,
pub corrupt: bool,
pub external_data_file: bool,
pub has_compression_type: bool,
pub extended_l2: bool,
#[skip] __: B59,
}
#[bitfield(bits = 64)]
#[derive(BinRead, Debug)]
#[br(map = reverse(Self::from_bytes))]
pub struct CompatibleFeatures {
pub lazy_refcount: bool,
#[skip] __: B63,
}
#[bitfield(bits = 64)]
#[derive(BinRead, Debug)]
#[br(map = reverse(Self::from_bytes))]
pub struct AutoClearFeatures {
pub bitmap_extension: bool,
pub raw_external_data: bool,
#[skip] __: B62,
}