- I need to send a long string to network, and I want to compress it.
Corona don’t have any lib to compress string so I wrote a LZW lib by myself. But after compress string, my data can’t encode and decode base64 correctly. Without base64, my LZW lib compress and decompress perfectly.
So anyone have a better way? I fond so much lua lib with C++, but can’t use them with Corona [import]uid: 9190 topic_id: 33474 reply_id: 333474[/import]
Try Ascii85 encoding!
Also you should try Huffman Encoding… Some time back I used this library(Huffman and LZW both implemented) for compression [import]uid: 64174 topic_id: 33474 reply_id: 133021[/import]
Try Ascii85 encoding!
Also you should try Huffman Encoding… Some time back I used this library(Huffman and LZW both implemented) for compression [import]uid: 64174 topic_id: 33474 reply_id: 133021[/import]
Hey Satheesh!
Ascii-85encoding works great! Thanks!
However, I would love to take advantage of your huffman/lzw code you put up on wowace. Ive run into some roadblocks stripping out the warcraft specific stuff and integrating it to make corona happy.
Added the new bit lib (https://github.com/davidm/lua-bit-numberlua/) to cover the required bit manipulations (and bit manipulations seem to work well standalone),
Any chance you could package it up like you did ascii85?
Thanks! [import]uid: 9070 topic_id: 33474 reply_id: 136040[/import]
I think I might have a working copy… wait let me get back! [import]uid: 64174 topic_id: 33474 reply_id: 136052[/import]
Ok here it is… that should work.
http://www.multiupload.nl/FP8MZWK2L5 [import]uid: 64174 topic_id: 33474 reply_id: 136053[/import]
Hey Satheesh!
Ascii-85encoding works great! Thanks!
However, I would love to take advantage of your huffman/lzw code you put up on wowace. Ive run into some roadblocks stripping out the warcraft specific stuff and integrating it to make corona happy.
Added the new bit lib (https://github.com/davidm/lua-bit-numberlua/) to cover the required bit manipulations (and bit manipulations seem to work well standalone),
Any chance you could package it up like you did ascii85?
Thanks! [import]uid: 9070 topic_id: 33474 reply_id: 136040[/import]
I think I might have a working copy… wait let me get back! [import]uid: 64174 topic_id: 33474 reply_id: 136052[/import]
Ok here it is… that should work.
http://www.multiupload.nl/FP8MZWK2L5 [import]uid: 64174 topic_id: 33474 reply_id: 136053[/import]