Calculate offsets & total size for C-like structs (packet layout helper).
Supports common types (u8/u16/u32/u64, int*, char, bool, float/double). Arrays supported.
| Field | Type | Count | Size | Align | Offset | Notes |
|---|---|---|---|---|---|---|
| Paste a struct to see results. | ||||||
Compilers align fields for efficient access. Padding bytes can be inserted between fields and at struct end.
It can reduce size but may hurt performance and can cause unaligned access issues on some targets.