3 Replies Latest reply on Jun 8, 2007 6:30 AM by AntiTRUST�

    How to Compress a String/Integer ??

    AntiTRUST� Level 1
      Hello Riders!
      I need some help and suggestions here, I have a string of such kind:

      I want to make the above string an integer, but when i go to make the above string only Numeric, such kind of integer comes out:

      And obviously such kind of codes are not feasible any kind of communication or registration processes. So, i need to know is there is any way around or do you guys have any suggestions to overcome on this problem??

      Any of your suggestions or comments will be very highly appreciated in this regard.

      Thanks in Advance!
        • 1. Re: How to Compress a String/Integer ??
          James Newton, ACP Level 3
          Are you saving this string in a database? Is that where the "Numeric" format comes from?

          Is your string a hexadecimal value, or will it contain letters such as O and X?

          Why do you need to compress it?
          • 2. Re: How to Compress a String/Integer ??
            AntiTRUST� Level 1
            Hello Openspark,
            No, this string is not yet saving into the database, it is an AlphaNumeric String, that contains Numbers from 0-9 and Alphabets from A-Z. No Special Characters Included.

            Basically its a kind of registration code that i am going to use for registering local application, this string is supposed to be transfered to me from client over telephone or over internet(This internet solution is already done, as there is no need to speak this string over phone so this way has no problem).

            Once a user/client is giving/telling string to me, it is difficult to understand alphabets over phone, and hence this thing takes time. So, i decided to convert this string into numbers, but for converting numbers into numbers and characters into numbers, i applied a self made algo that puts TWO numbers for any Character/Number. For example:
            For the Character A, i assigned numbers 51. For the Character M, i assigned numbers 22. For the Number 8 i assigned Number 66, etc...

            I hope you understand what i am trying to do and wants to accomplish. So, i have successfully transferred this string into the number, but now the lenght of the number is too much big, so here i am in need to compress it.

            Any suggestions?

            • 3. Re: How to Compress a String/Integer ??
              AntiTRUST� Level 1
              One of my friend give me some hint for using RLE and Huffman compressions/algorithms. I have started searching but i dont know how can i be able to use these compression techniques into lingo/director.

              Any clues??