Open LeftofZen opened 1 week ago
Just recently I added the auto-save and this DOES save the original bytes: https://github.com/OpenLoco/ObjectEditor/blob/master/Gui/Models/ObjectEditorModel.cs#L225
But clicking the button "Download" we do save the uncompressed file, which is the issue: https://github.com/OpenLoco/ObjectEditor/blob/master/Gui/ViewModels/DatTypes/DatObjectEditorViewModel.cs#L184
Using
Online
mode in the editor to view and download objects, the file that is downloaded and saved to disk will be the extracted/unencoded version of the DAT file. This means the images are not compressed. This means some DAT files go from 700kb to 19mb, a massive size increase. Since the game can read the encoded versions, we should simply save the original encoded version of the file.I wasn't aware the size increase could be so great, and this means I might have to implement compression into object saving (even just single pass would be good)