#[non_exhaustive]pub enum Check {
Show 115 variants
TrailerMagic,
TrailerCrc32c,
HeaderMagic,
HeaderVersion,
HeaderDirOffset,
HeaderFlagsReserved,
HeaderTotalUncompressedSize,
DirDescriptor,
DirOverlap,
DirChunkExtent,
DirHeadFirst,
PresenceHead,
PresenceMeta,
PresenceLtbl,
PresenceLayr,
PresenceAuth,
PresenceZdic,
HeadVersion,
HeadFrame,
HeadTotalLayers,
HeadLayerHeight,
HeadBuildDims,
HeadDisplayPixels,
HeadMultiSectorFlag,
AuthVersion,
AuthCipherKnown,
AuthFrame,
MetaJson,
MetaVersion,
MetaRequiredFields,
MetaTimeInteger,
MetaExposure,
MetaLayerHeight,
MetaMaterialsShape,
MetaSectorsShape,
MetaSectorMaterialIndex,
MetaCureCurve,
MetaTemperatureRange,
PwmRange,
ProfProfileType,
ProfProfileIdentity,
ProfSettingsTimeInteger,
ProfSettingsExposure,
ProfSettingsLayerHeight,
ProfCureCurve,
ProfProfileUuid,
ProfMaterialsShape,
LrovJson,
LrovTimeInteger,
LrovOrphan,
PrevFlags,
PrevPngSignature,
VoxlSignature,
ExtdFrame,
ExtdExtType,
ExtdFlags,
ExtdCritical,
LtblVersion,
LtblLayerCount,
LtblEntrySize,
LtblEntryCount,
LtblLayerIndexRange,
LtblSectorIdsAscending,
LtblSectorIdUnique,
LtblFirstEntryIsSectorZero,
LtblFirstLayrInRange,
LtblFirstLrovNull,
LtblFirstLrovInRange,
LtblOffsetWithinChunk,
LtblSlicesDisjoint,
LayrVersion,
LayrContentSizePresent,
LayrFrameDecompressedSize,
FrameAllocationBound,
LayrDictIdMatch,
LayrDictIdAbsent,
ZdicVersion,
ZdicDictSize,
ZdicDictIdMatch,
ZdicSingle,
LhasFrame,
LhasHashAlgorithm,
LhasLayerCount,
LhasRootRecompute,
LhasLeafMatch,
ReeTag,
ReeVarint,
ReePlanes,
ReeFirstValue,
ReeNoRunCountZero,
ReeRunLengths,
ReeGrayscaleRuns,
ReeGrayscaleAllBinary,
ReeSplitAllBinary,
ReeSplitThreshold,
ReeSplitPositions,
ReeAttachPositions,
ReeAttachCount,
ReeAttachBits,
ReeAttachThreshold,
ReeEndPositions,
ReeNoTrailingBytes,
ReeDataSize,
SectorPartition,
CryptModeEmpty,
CryptPasswordSectionLen,
CryptMachineSectionLen,
CryptArgon2Budget,
CryptChunkFlags,
CryptTagVerify,
CryptUnitIndexBinding,
CryptKeyUnwrap,
CryptRecipientEntry,
CryptLowOrderPoint,
CryptNoKey,
}Expand description
A named conformance check, mirroring the corpus convention <group>.<rule>.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TrailerMagic
LEND magic is absent from the last 8 bytes.
TrailerCrc32c
Trailer CRC-32C does not match bytes[0 .. file_len-8].
HeaderMagic
LUMN magic is absent at offset 0.
HeaderVersion
header.version is not recognized.
HeaderDirOffset
header.dir_offset is outside the file, or the directory does not fit.
HeaderFlagsReserved
header.flags sets a reserved bit (0, 2 or 4).
HeaderTotalUncompressedSize
header.total_uncompressed_size is non-zero and wrong.
DirDescriptor
A chunk descriptor could not be read.
DirOverlap
Two chunks overlap.
DirChunkExtent
A chunk’s stored extent lies outside the file, or inside the directory.
DirHeadFirst
The first chunk is not HEAD.
PresenceHead
A required chunk is missing.
PresenceMeta
META is missing.
PresenceLtbl
LTBL is missing.
PresenceLayr
LAYR is missing.
PresenceAuth
The ENCRYPTED flag is set but AUTH is absent, or vice versa.
PresenceZdic
Exactly one ZDIC is required (or forbidden) by the LAYR frames.
HeadVersion
head_version is not recognized.
HeadFrame
encoder_name_len exceeds 256, or the chunk is not exactly the fixed
fields plus the name.
HeadTotalLayers
total_layers == 0, or disagrees with LTBL.layer_count.
HeadLayerHeight
layer_height_um == 0.
HeadBuildDims
A build dimension is zero.
HeadDisplayPixels
display_width_px * display_height_px == 0.
HeadMultiSectorFlag
MULTI_SECTOR is set without a layer carrying more than one sector, or
clear while one does.
AuthVersion
auth_version is not recognized.
AuthCipherKnown
cipher_id is not A256 or C20P.
AuthFrame
The AUTH payload is too short for its declared sections.
MetaJson
The META payload is not a JSON object.
MetaVersion
meta_version is absent or unrecognized.
MetaRequiredFields
A required META field is absent.
MetaTimeInteger
A META duration is not an integer number of milliseconds.
MetaExposure
An exposure time is not > 0.
MetaLayerHeight
layer_height_um is not > 0.
MetaMaterialsShape
materials, when present, is not a non-empty array of named entries.
MetaSectorsShape
sectors, when present, is not an array of objects with unique ids >= 1.
MetaSectorMaterialIndex
A sector’s material_index addresses no non-empty materials array.
MetaCureCurve
A cure curve has a non-positive dp_um/ec_mj_cm2 or a negative e0_mj_cm2.
MetaTemperatureRange
A temperature is outside [0.0, 120.0].
PwmRange
A light_pwm or bottom_light_pwm is outside 0..=255, in any payload
that carries one (section 4.2).
ProfProfileType
profile_type is not one of material, printer, combined.
ProfProfileIdentity
profile_name or profile_version is empty.
ProfSettingsTimeInteger
A profile duration is not an integer number of milliseconds.
ProfSettingsExposure
A profile exposure time is not > 0.
ProfSettingsLayerHeight
A profile layer_height_um is not > 0.
ProfCureCurve
A profile cure curve is out of range.
ProfProfileUuid
profile_uuid is not a well-formed UUID string.
ProfMaterialsShape
Profile materials are malformed.
LrovJson
The payload is not a JSON object.
LrovTimeInteger
An overridden duration is not an integer number of milliseconds.
LrovOrphan
An LROV chunk is referenced by no entry. Several entries naming one
chunk is how an override set covers a range of pairs, and is legal.
PrevFlags
A reserved flag bit is set, or the role is outside 0-3.
PrevPngSignature
The payload does not begin with the PNG signature (strict mode).
VoxlSignature
The payload is neither VOXL V2 nor a VOXL V1 document (strict mode).
ExtdFrame
The payload is shorter than the 8-byte frame.
ExtdExtType
ext_type is not four ASCII characters.
ExtdFlags
A reserved flag bit is set.
ExtdCritical
An unimplemented extension carries critical = 1.
LtblVersion
table_version is not recognized.
LtblLayerCount
layer_count disagrees with HEAD.total_layers.
LtblEntrySize
entry_size < 28, or the entries do not fit the chunk.
LtblEntryCount
The entries do not account for every layer, or entry_count disagrees
with the sum of 1 + additional_sector_count over each layer’s first
entry, or a non-first entry carries a non-zero count.
LtblLayerIndexRange
A read or a table entry names a layer the table does not describe.
LtblSectorIdsAscending
Sector ids do not ascend within a layer.
LtblSectorIdUnique
The same sector id appears twice on one layer.
LtblFirstEntryIsSectorZero
A layer’s first entry is not sector 0’s.
LtblFirstLayrInRange
first_layr is not the directory index of a LAYR chunk.
LtblFirstLrovNull
An LROV chunk no entry names carries a payload no named chunk carries.
LtblFirstLrovInRange
first_lrov is neither 0 nor the directory index of an LROV chunk.
LtblOffsetWithinChunk
data_offset + data_size exceeds the LAYR chunk’s decompressed output.
LtblSlicesDisjoint
Two slices of one LAYR chunk overlap.
LayrVersion
layr_version is not recognized.
LayrContentSizePresent
A frame carries no content size, so a reader cannot size its output.
LayrFrameDecompressedSize
A frame did not decompress to the size it declares.
FrameAllocationBound
A frame’s declared output exceeds what its stored size may expand to.
LayrDictIdMatch
A frame’s dictionary ID disagrees with ZDIC.
LayrDictIdAbsent
A frame reports no dictionary while the file carries ZDIC.
ZdicVersion
zdic_version is not recognized.
ZdicDictSize
dict_size exceeds ZDIC_DICTSIZE_MAX, or the bytes are missing.
ZdicDictIdMatch
dict_id disagrees with the LAYR frames.
ZdicSingle
More than one non-null ZDIC chunk is present.
LhasFrame
The payload is too short for its header and hashes.
LhasHashAlgorithm
hash_algorithm is not 0x01 (SHA-256).
LhasLayerCount
layer_count disagrees with HEAD.total_layers.
LhasRootRecompute
The recomputed Merkle root differs from the stored one.
LhasLeafMatch
A layer’s recomputed leaf hash differs from the stored one (strict mode).
ReeTag
A layer carries an encoding tag other than 0x00-0x03.
ReeVarint
A varint is overlong, truncated, or longer than 10 bytes.
ReePlanes
The four plane lengths of a varint array describe planes that are not prefix-closed, or that hold more bytes than the array’s varints use (strict); or a value needs more than four planes to encode.
ReeFirstValue
A binary REE first_value is neither 0x00 nor 0xFF.
ReeNoRunCountZero
The non-canonical run_count == 0 form (strict mode).
ReeRunLengths
A stored run length is zero, or the lengths do not sum to total_pixels (strict).
ReeGrayscaleRuns
Adjacent grayscale runs carry the same value, or a run is empty (strict).
ReeGrayscaleAllBinary
An all-0x00/0xFF layer is stored as grayscale REE (strict).
ReeSplitAllBinary
An all-0x00/0xFF layer is stored as split REE, with no anti-aliasing
to overlay (strict).
ReeSplitThreshold
The split binary component does not threshold at v >= 128 (strict).
ReeSplitPositions
Split overlay positions are not strictly increasing, or out of range.
ReeAttachPositions
Attached-form escapes are not strictly increasing, fall outside the layer, or do not sit strictly inside the core run they belong to.
ReeAttachCount
aa_pixel_count disagrees with the pixels the attachment bits and escapes
describe.
ReeAttachBits
An attachment bit addresses a run that does not exist, or a run of one pixel claims both of its ends, or padding bits past the last run are set (strict).
ReeAttachThreshold
An attached-form overlay value is 0x00/0xFF, or does not threshold to
the core run it sits in (strict).
ReeEndPositions
The decoded stream does not end exactly at total_pixels.
ReeNoTrailingBytes
Bytes follow the end of a layer’s REE stream.
ReeDataSize
A layer’s data_size does not match its decoded stream.
SectorPartition
Sector masks of one layer overlap (strict mode).
CryptModeEmpty
AUTH.mode has no bit set.
CryptPasswordSectionLen
The password section is shorter than its fixed 65 bytes.
CryptMachineSectionLen
The machine section holds no complete recipient entry.
CryptArgon2Budget
Argon2id parameters exceed the reader’s budget.
CryptChunkFlags
A chunk’s encrypted flag disagrees with the file’s ENCRYPTED flag.
CryptTagVerify
An AEAD tag did not verify.
CryptUnitIndexBinding
A LAYR frame’s associated data did not bind it to its directory index.
CryptKeyUnwrap
A wrapped session key did not unwrap.
CryptRecipientEntry
A machine recipient entry is malformed.
CryptLowOrderPoint
An X25519 exchange produced the all-zero shared secret.
CryptNoKey
No key could be recovered: wrong password, or no matching recipient.