Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2me apps

 
jaid bagwan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
I m developing an mobile CLDC application and It is an SMS related application. Every character in the message is to be replaced with a string. So,

should I maintain a database table of that replacment strings which scans and replace this entry OR

should I apply through code like
if(char A found)
then replace it with some string.


I am doing this for compressing the SMS data, so if there is any technique for achieving text to text compression, please tell me.
Please help me in this problem.....
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many techniques for compressing data, but the cldc is a remakably limited api and does not have a compression routine. For most compression, use Lempel-Ziv-Welch (LZW), which is the same as the java archive file compression uses, the library is available in Java - already useable.
See: Compression (Zips & JARs) Code Samples
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic