GZip for Level Files #33
Etiketter
Ingen Etikett
bug
doodad
enhancement
levels & doodads
security
ui toolkit
wontfix
Ingen Milsten
Ingen tilldelad
1 Deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
No dependencies set.
Reference: SketchyMaze/doodle#33
Laddar…
Referens i nytt ärende
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, level and doodad files are in JSON format and they could benefit by some simple GZip compression.
For example, the "full-color Mario 1-1 example level" weighs 168 MB in size but after gzip compressing it, it reduced all the way down to 13 MB! (93% reduction). In Go, the gzip reader should transparently allow compression and decompression in level files.
Doodle should check for a gzip header when reading to tell whether the file is compressed or not, so legacy files can still be opened.
(Ticket was formerly: "SQLite as an Application File Format"; rejected because SQLite would make cross-compiling difficult)
https://www.sqlite.org/appfileformat.html
Levels and Doodads are currently stored as plain .json files and there's room for improvement (compression, obfuscation) and eventually the need to embed custom files inside of levels (attach custom doodads, wallpapers, etc.)
Instead of just moving to a gzipped JSON format or something more custom, SQLite may be a good next version to move to. It could use a couple of SQL tables to organize its data:
Doodle could be programmed to read legacy json files as normal by checking for the opening
{
character at the head of the file, or new SQLite files by checking for a SQLite header.SQLite as an Application File Formattill GZip for Level Files