Compress/Zip a String

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Compress/Zip a String

    I need to convert a string, an URI/EmailAddress based string into a
    letter/number only string. I know I can use acsii table, but that will
    make each char into a 2 letter thing, that will increase the length of
    the string by 100%. I know there are many zip/compress algorithm for
    files. I used gzip to zip text file, and the ratio is 10%, so that
    means using a good algorithm, I can cut 90% fat. I wonder if anyone
    can show me a way to zip/compress a string ([url]http://?&key=value[/url], and
    [email]something@somewhere.com[/email] like) into the least of letters/numbers

    Thank you.
    http://edealseek.com/newsgroup.html Guest

  2. Similar Questions and Discussions

    1. compress pdf
      Hello. I have written some code to save a pdf file. However, I want to add code to compress the file, so the file-size will be reduced. Does...
    2. ByteArray Compress
      It seems that bytearray compress uses a different algorithm than the one used by PHP anyone knows of any PHP class to uncompress a compressed...
    3. How to Compress with Acrobat CS
      HI, I've constructed an A5 high res (300 DPI) 12 page PDF. The PDF is a collection of 12 Illustrator files, which in turn included PSD's, Vector's...
    4. ssh and compress problem
      Hi, everyone! Can anyone please help me to resolve the following "ksh: /tmp/CSHM2_P3: cannot open" problem? I have no problem to create empty...
    5. Compress Movie
      When publishing with MX Prof 2004 7.0.1, Win98, compress movie is automatically checked. When I publish the movie with the compress movie checked,...
  3. #2

    Default Re: Compress/Zip a String

    [url]http://edealseek.com/newsgroup.html[/url] wrote:
    > I need to convert a string, an URI/EmailAddress based string into a
    > letter/number only string.
    It appears you are looking for uuencode/uudecode.

    jue


    Jürgen Exner Guest

  4. #3

    Default Re: Compress/Zip a String

    "Jurgen Exner <jurgenex@hotmail.com> wrote:
    : [url]http://edealseek.com/newsgroup.html[/url] wrote:
    :> I need to convert a string, an URI/EmailAddress based string into a
    :> letter/number only string.

    : It appears you are looking for uuencode/uudecode.

    Or base64. It's just as clen, and generally smaller.

    Either will still expand the string. However, compressing it will almost
    certainly produce binary data, and render goal of letters and numbers only
    to be moot.

    Could this be an XY problem?

    --
    Louis Erickson - [email]wwonko@rdwarf.com[/email] - [url]http://www.rdwarf.com/~wwonko/[/url]

    Better dead than mellow.
    Louis Erickson Guest

  5. #4

    Default Re: Compress/Zip a String

    [url]http://edealseek.com/newsgroup.html[/url] (a@slip-12-64-158-90.mis.prserv.net) wrote:
    : I need to convert a string, an URI/EmailAddress based string into a
    : letter/number only string. I know I can use acsii table, but that will
    : make each char into a 2 letter thing, that will increase the length of
    : the string by 100%. I know there are many zip/compress algorithm for
    : files. I used gzip to zip text file, and the ratio is 10%, so that
    : means using a good algorithm, I can cut 90% fat. I wonder if anyone
    : can show me a way to zip/compress a string ([url]http://?&key=value[/url], and
    : [email]something@somewhere.com[/email] like) into the least of letters/numbers

    zip and then base64

    zip makes it as small a possible

    base64 makes it a little bigger but in ascii


    Malcolm Dew-Jones Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139