ramdb/extension
Jacob Schmidt 1d5225f279
All checks were successful
Build / Build (push) Successful in 29s
feat: Implement binary serialization for RAM database and mission end save
This commit introduces binary serialization for the RAM database to improve performance and adds a mission end event handler to ensure data is saved with a backup when the mission ends.

- Implemented binary serialization and deserialization for key-values, hash tables, and lists in `Utils.cs`. This replaces the previous text-based serialization, resulting in faster save and load times.
- Moved data writing and reading logic from `RAMDb.cs` to `Utils.cs` for better code organization and reusability.
- Modified `RAMDb.cs` to use the new binary serialization methods (`ExportToBinary` and `ImportFromBinary`).
- Added a mission end event handler in `XEH_preInit_server.sqf` to trigger a forced save with backup when the mission ends. This ensures that data is not lost in case of unexpected server shutdowns.
- Updated the extension binaries (`ArmaRAMDb_x64.dll` and `ArmaRAMDb_x64.so`) with the new serialization logic.
- Added a static `db` property to the `Main` class to allow access to the `RAMDb` instance from anywhere in the extension.
- Modified the `Save` and `Load` methods in `Main.cs` to use the new binary serialization methods.
- Updated the `Dispose` method in `RAMDb.cs` to ensure a final save and backup is performed when the object is disposed.
2025-05-03 19:34:15 -05:00
..
2024-11-10 14:33:22 -06:00