Page 3 of 3
Re: Bad Apple!! in Love2D
Posted: Mon Aug 29, 2016 7:29 am
by raidho36
I guess it's a bit late, but have you tried diff coding? It tends to produce much more compressible output for LZMA. There kinda already is a bit of it, since it only changes pixels between frames, but that's sub-optimal. Start with top left corner and some default value to "current" vlaue (e.g. black) and for each pixel, see if it's a different value than current one, write down the difference for that pixel. If it's the same, write 0. With such file, most of pixels are just zeroes or short patterns, this compresses exceptionally well with LZMA. You can extend diff-coding to previous line as well as previous pixel, and then to previous frame. This eventually produces very well compressible output.
Re: Bad Apple!! in Love2D
Posted: Mon Aug 29, 2016 7:33 pm
by Segfaultd
raidho36 wrote:I guess it's a bit late, but have you tried diff coding? It tends to produce much more compressible output for LZMA. There kinda already is a bit of it, since it only changes pixels between frames, but that's sub-optimal. Start with top left corner and some default value to "current" vlaue (e.g. black) and for each pixel, see if it's a different value than current one, write down the difference for that pixel. If it's the same, write 0. With such file, most of pixels are just zeroes or short patterns, this compresses exceptionally well with LZMA. You can extend diff-coding to previous line as well as previous pixel, and then to previous frame. This eventually produces very well compressible output.
Great idea! I'll try to come with something here and see the results.