ultraq / redhorizon

Recreating the original 2D Command & Conquer games
Apache License 2.0
6 stars 4 forks source link

Improve/Fix file encoding #54

Closed ultraq closed 5 months ago

ultraq commented 6 months ago

Somewhat related to #34, while working on these I've found that the methods for encoding and figuring out what encoding works, aren't optimal in that they spend a lot of time going through each potential compression method sequentially to determine the best one. Would be good to make in-memory copies of the source buffer and run the compression algorithms in parallel to determine a winner, repeat until done 🤔

It might be good to start from scratch too, where we start with no compression, then add each one in one at a time, as it's hard to make tests for these conversions if we can't tell what's busted.