#ifndef FACTORIO_DESERIALISER_BRIDGE_H #define FACTORIO_DESERIALISER_BRIDGE_H #include "version_bridge.h" typedef struct { FactorioMapVersion version; unsigned allocations, reads, target_capacity; uint64_t heap_bytes, stream_cursor; int owns_target; } FactorioDeserialiserProbe; /* Initialize a fresh original deserializer from a nine-byte version prefix. * 0 success; 1 short input; 2 invalid; 5 heap exhaustion; 6 unsupported service; * 7 original version-error branch. No output commits on failure. */ int factorio_deserialiser_probe(const uint8_t *prefix, size_t length, FactorioDeserialiserProbe *out); #endif