.p8.png code compression is inefficient, does not match Pico-8 #7

Closed
dansanderson opened this Issue Oct 22, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@dansanderson
Owner

dansanderson commented Oct 22, 2016

The current compress_code routine creates a compressed code blob that is compatible with Pico-8's decompressor (and picotool's own decompressor). However it is far less efficient than Pico-8's compressor and the results are very large, often much larger than the uncompressed original. So something is wrong.

Note that Pico-8's info command doesn't reflect this because it loads the cart successfully then runs its own compressor to determine the compressed size.

See the commented-out lines of testCompressCodeHelloExample to test the failure.

dansanderson added a commit that referenced this issue Oct 22, 2016

stats command calculates compressed size even if the cart code was no…
…t originally compressed (.p8 or small .p8.png).

I'm only now noticing that the compression routine is compatible with Pico-8's decompressor but produces a much less efficient result than Pico-8's compressor. Filed issue #7.
@dansanderson

This comment has been minimized.

Show comment
Hide comment
@dansanderson

dansanderson Oct 23, 2016

Owner

Fixed quickly with a port of the (slow) original Pico-8 C compression code. As time allows I'll revisit the broken implementation and try to fix it.

Owner

dansanderson commented Oct 23, 2016

Fixed quickly with a port of the (slow) original Pico-8 C compression code. As time allows I'll revisit the broken implementation and try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment