Open basxto opened 3 years ago
Reordering to improve compression is a cool idea! I’m a bit intimidated by search space / algorithmic complexity of it though…
Optimizing for repeated byte sequences in LZ would be indeed quite complex. Runs should be easier, but yes, there would be always some complexity.
For runs it would be: What symbol a tile starts with and with which it ends and how often those are repeated; with planes in mind that would be per tile per lane.
For a start it might be enough to have a permutation format, that would allow scrambling or reordering with external tools. That would also split ordering from conversion and allow to order it once and then convert it a lot of times (unconverted images in a git repo).
When a tilemap is used, the actual tile order in vram does not really matter. So it would be cool to have an option to reorder them.
The easiest versions would be:
Those two could even get combined.
More complex versions would reorder them to improve tile compression:
This would be an option of
superfamiconv tiles
, I'd call it--scramble
or--reorder