Runtime decompression in Pokitto?

Has anyone used compressed data in Pokitto? I would like to decompress data from SD and store the result in SD with Pokitto. Is there any decompression code already used in some Pokitto projects?

1 Like

I haven’t done it myself, but what compression method do you want to use? Or no preference??

2 Likes

@FManga had a video player whiched used lz4 compression iirc.

2 Likes

Never tried it, but it should work:

Otherwise depending on what you’re doing stuff like run-length encoding, LZ77 or Huffman Coding may be suitable.

2 Likes

The data to be compressed/decompressed is mostly sampled music clips but can contain bitmap data too.

1 Like

Why do you need to store the decompressed data to SD? Couldn’t you decompress the stuff on the PC and copy to the SD card already decompressed? Or am I on the wrong path here?

1 Like

Just decompressing to ram in Pokitto will do also.

1 Like

There is already an asm-optimized lz4 decompressor in the PokittoLib, it is used in the video player, like tuxinator mentioned.

2 Likes

That sounds great!

1 Like

I used simple text compression here, but what algorithm you want depends on what kind of data you want to compress.

3 Likes