| Reply | « Previous Thread | Next Thread » |
|
Hello,
I'm searching for an effective way to store some text information in a jar file. Is there a good way to encode text before it gets zipped in the jar of a j2me application to reduce the resulting jar size? Some links, articles or sample source code for de- en- coding would be great.. Thanks !! Jan |
| JWtheCoolOne |
| View Public Profile |
| Find all posts by JWtheCoolOne |
|
You'd be wasting your time. Information theory is heavy stuff and the zip algoritm is pretty optimal.
An alternative might be to use better zip compression (jar is zip), I have tried it a couple of times and not had any problems. Thomas |
|
skjolber is correct and you are unlikely to be able to beat zip compression however.....
It depends on your text - if it's a lot of text that is very repetitive you might be able to beat the zip compression by making your own dictionary of words and then storing indices rather than words. eg String []aszDictionary = { ". ", "See", "Spot", "run", }; int []nMyFirstBook = { 1, 2, 0, 1, 2, 3, 0, 3, 2, 3, }; Which obviously has a chance of beating zip compression. cheers Danack |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|