Expand description
Autodesk Inventor files (.ipt, .iam): the segments below the OLE
storage RSeStorage (see docs/src/research/inventor-display-preview.md).
Every segment has a meta stream M<id> and a data stream B<id>:
M<id>: u32 25 "RSe Meta Stream Version 8" | u16 | 16 bytes
| u32 n, n × UTF-16 segment name | class UUID | 3 × u32
| u32 n, ASCII date | u32 n, ASCII date | u8 | zlib/zstd body:
7 × u16 | u32 sections, sections × u32 (bit 31 + length) | u32
| u32 n, n × 10 bytes | u32 | u32 n, n × 28 bytes | u32
| u32 classes, classes × (UUID, u16, u32, u16, u32)
B<id>: 18 bytes | zlib/zstd body: per section
u32 class word (low byte: class table index) | payload
| u32 payload length again | u8 0The bodies are zlib (Inventor 2019–2024 as tested) or Zstandard (newer files, issue #271), told apart by their magic bytes. Where the header of a Zstandard stream ends is not known from real files: the frame is taken at the zlib offset, else at the first Zstandard magic close to it.
Classes are named by the first 32 bits of their UUID (time_low). Every
length is checked against the data before it is used, unpacked streams
are capped, and a damaged file is an error, never a panic.
Structs§
- Array
- A typed array: its element type and raw elements.
- Cursor
- Reads typed values from a section payload.
- Section
- One section of a segment.
- Sections
- Iterator over the sections of a
Segment. - Segment
- One segment: its section lengths, its class table and the inflated data.
Constants§
- ARRAY
- Marker of a typed array.
- ELEM_
KEYS - Element type of key arrays (
u32too). - ELEM_
U32 - Element type of
u32arrays. - POINT2F
- Array element class:
f322D point. - POINT3F
- Array element class:
f32point (x, y, z). - VECTO
R3F - Array element class:
f32unit vector.
Functions§
- read_
stream - A whole stream of the compound file, at most
limitbytes. - segment
- The segment named
name(e.g.PmGraphicsSegment), inflating at mostlimitbytes;Ok(None)when the file has no such segment.