rage1 icon indicating copy to clipboard operation
rage1 copied to clipboard

btile: alternative DATASET compression: ZX0 with initial prefix table

Open jorgegv opened this issue 1 year ago • 1 comments

Again, Bedazzle in SC forums said:

My thought was - ZX0 does support compressing with prefix, thus memory blocks with some similar data can be compressed separately while using some constant dictionary at start, and achieving good results for dozen parts, like these were packed in one go. Some time ago I played with compressing Lode runner levels. There was used ZX7, and of course compressing each level separately resulted in not so good compression, while packing all the levels in one go was brilliant. But having all 100+ levels in one compressed block does impossible to unpack one particular level. So I was pointed by one guy (thanks, Intospec) to create prefix (dictionary) for all these levels, and packed each one separately. Resulting total size was much smaller, than all the levels packed separately, and a little bigger than all levels together.

Ideas to test:

  • [ ] We can try to compress all DATASETs in a bank in this way, store the initial prefix table in the bank and see if better compression is achieved.

  • [x] We can also compress all DATASETs and store the initial prefix table in low memory (if it's not big) and see if better compression achieved - Update: this is not possible. The prefix must be at the beginning of the decompressed data.

jorgegv avatar Oct 10 '22 19:10 jorgegv

Interesting concept. Curious about the results.

On Mon, 10 Oct 2022 at 21:07, jorgegv @.***> wrote:

Again, Bedazzle in SC forums said:

My thought was - ZX0 does support compressing with prefix, thus memory blocks with some similar data can be compressed separately while using some constant dictionary at start, and achieving good results for dozen parts, like these were packed in one go. Some time ago I played with compressing Lode runner levels. There was used ZX7, and of course compressing each level separately resulted in not so good compression, while packing all the levels in one go was brilliant. But having all 100+ levels in one compressed block does impossible to unpack one particular level. So I was pointed by one guy (thanks, Intospec) to create prefix (dictionary) for all these levels, and packed each one separately. Resulting total size was much smaller, than all the levels packed separately, and a little bigger than all levels together.

We can try to compress all DATASETs in a bank in this way, store the initial prefix table in the bank and see if better compression is achieved.

We can also compress all DATASETs and store the initial prefix table in low memory (if it's not big) and see if better compression achieved

— Reply to this email directly, view it on GitHub https://github.com/jorgegv/rage1/issues/110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAYZ6KANX3OYGNTYYOEXFLWCRSOFANCNFSM6AAAAAARBTJHLA . You are receiving this because you are subscribed to this thread.Message ID: @.***>