#ifndef FACTORIO_SAVE_HEADER_H #define FACTORIO_SAVE_HEADER_H #include "version_bridge.h" /* Header probe only: does not verify the whole archive or deserialize the map. */ enum FactorioSaveStatus { FACTORIO_SAVE_OK = 0, FACTORIO_SAVE_IO, FACTORIO_SAVE_INVALID_ZIP, FACTORIO_SAVE_NO_LEVEL, FACTORIO_SAVE_UNSUPPORTED, FACTORIO_SAVE_COMPRESSION, FACTORIO_SAVE_SHORT_HEADER, FACTORIO_SAVE_PREFIX_LIMIT }; int factorio_save_header(const char *path, FactorioMapVersion *out); /* Decode exactly length bytes of the nested map stream (1..1 MiB). * Writes out only on success. Does not validate the complete stream/archive. */ int factorio_save_prefix(const char *path, uint8_t *out, size_t length); const char *factorio_save_status_string(int status); #endif