Email or username:

Password:

Forgot your password?
12 comments
cancel

@neauoire @dichotomiker you should put a note that the encoder in uxn-utils is unsafe and the one from Uxn32 should be used for real software

Devine Lu Linvega

@cancel @dichotomiker sure, would you like to make a standalone file in the repo that I can link people to?

Devine Lu Linvega

@cancel I mean with build instructions and main(), so people can build it without too much fussing with it as a library.

cancel

@neauoire hmm. why not just copy uxn_lz.c and uxn_lz.h to your uxn-utils and use them?

cancel replied to Devine Lu Linvega

@neauoire nice :)

The reason I haven't made an example standalone program in C for it in the Uxn32 repo is that none of the Uxn32 code currently uses the C standard library, and doing a cross-platform cmd line program that does file operations would require to suddenly switch to using it. Not the end of the world but… well maybe I'll do it eventually.

Devine Lu Linvega replied to cancel

@cancel ah! I didn't know that. Good to know, yeah I'll bring the ref implementation and make a README for it!

cancel replied to Devine Lu Linvega

@neauoire sorry, I didn't document how to use the streaming decompressor yet. (Having to swap hard drives to work on Uxn32 is turning out to be pretty inconvenient...)

Verwechslungsgefährte 🍿

@neauoire @cancel Thanks. I got it working now.
codeberg.org/spazzpp2/julz/src
(Never do trial and error on index offsets in the middle of the night. Also, know your libraries).

I mostly used the table and the C implementation from wiki.xxiivv.com/site/ulz_forma for reference.

I was a little disappointed when I learned that CPY doesn't copy from the input but from the output array. So, no self-modification. Good for debugging, though.

Would you get more out of it when you assume, the compression always starts with LIT and then simply alternates between CPY and LIT? Their first bit would then be obsolete (twice as much length). You probably need a zero-length LIT as well.

CPY with length > offset repeating over and over again is a really nice idea, especially for ordered dither images!

@neauoire @cancel Thanks. I got it working now.
codeberg.org/spazzpp2/julz/src
(Never do trial and error on index offsets in the middle of the night. Also, know your libraries).

I mostly used the table and the C implementation from wiki.xxiivv.com/site/ulz_forma for reference.

Go Up