Re: Compress a String

Tech-Archive recommends: Fix windows errors by optimizing your registry



Adriano <adrian.owen@xxxxxxxxxxxxx> wrote:
Can anyone recommend a simple way to compress/decomress a String in
.NET 1.1 ?

I have a random string of 70 characters, the output from a DES3
encryption, and I wish to reduce the lengh of it,

I doubt very much whether you'll be able to compress it at all. The
more "random" data is, the less likely you are to be able to compress
it. Compression is almost always based on repeated patterns.

One thought though: the output of DES3 is binary, not text: how are you
converting the bytes into a string? There may be a way of doing that
which saves some more size.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.