Decode a [`TileSnapshot`] from MessagePack bytes produced by [`encode_snapshot`]. Errors map to [`ArrayError::SegmentCorruption`].
(b: &[u8])
| 136 | /// |
| 137 | /// Errors map to [`ArrayError::SegmentCorruption`]. |
| 138 | pub fn decode_snapshot(b: &[u8]) -> ArrayResult<TileSnapshot> { |
| 139 | zerompk::from_msgpack(b).map_err(|e| ArrayError::SegmentCorruption { |
| 140 | detail: format!("snapshot decode failed: {e}"), |
| 141 | }) |
| 142 | } |
| 143 | |
| 144 | // ─── Chunking ──────────────────────────────────────────────────────────────── |
| 145 |
no outgoing calls