Skip to main content
deleted 1 character in body
Source Link

You can simply approach it in two separate steps: Compress the data, then encrypt it. But compression won't do much with short data, like your nine-character example. In fact that one will probably get longer due to some overhead. Compression needs a reasonable amount of data so that it can find patterns that repeat. Otherwise, the best it can duedo is trim some bits off your ASCII characters.

Regarding, "no matter how long the input is, the result will always be 50 characters long" ... I could write you an encryption program that does that, for free. But you can't afford the decryption utility. Ha!

Seriously, you can't compress data at-will, unless you're willing to live with losses. For example, you can compress a JPG pic or MP3 song to configurable degrees, but it's "lossy"... i.e. you lose data. (The JPG gets blurry/pixelated. The MP3 sounds like a bad robot singing.) It would be interesting if someone's created a lossy text compressor, but I imagine it would just skip some letters and hope you can still read it.

You can simply approach it in two separate steps: Compress the data, then encrypt it. But compression won't do much with short data, like your nine-character example. In fact that one will probably get longer due to some overhead. Compression needs a reasonable amount of data so that it can find patterns that repeat. Otherwise, the best it can due is trim some bits off your ASCII characters.

Regarding, "no matter how long the input is, the result will always be 50 characters long" ... I could write you an encryption program that does that, for free. But you can't afford the decryption utility. Ha!

Seriously, you can't compress data at-will, unless you're willing to live with losses. For example, you can compress a JPG pic or MP3 song to configurable degrees, but it's "lossy"... i.e. you lose data. (The JPG gets blurry/pixelated. The MP3 sounds like a bad robot singing.) It would be interesting if someone's created a lossy text compressor, but I imagine it would just skip some letters and hope you can still read it.

You can simply approach it in two separate steps: Compress the data, then encrypt it. But compression won't do much with short data, like your nine-character example. In fact that one will probably get longer due to some overhead. Compression needs a reasonable amount of data so that it can find patterns that repeat. Otherwise, the best it can do is trim some bits off your ASCII characters.

Regarding, "no matter how long the input is, the result will always be 50 characters long" ... I could write you an encryption program that does that, for free. But you can't afford the decryption utility. Ha!

Seriously, you can't compress data at-will, unless you're willing to live with losses. For example, you can compress a JPG pic or MP3 song to configurable degrees, but it's "lossy"... i.e. you lose data. (The JPG gets blurry/pixelated. The MP3 sounds like a bad robot singing.) It would be interesting if someone's created a lossy text compressor, but I imagine it would just skip some letters and hope you can still read it.

Source Link

You can simply approach it in two separate steps: Compress the data, then encrypt it. But compression won't do much with short data, like your nine-character example. In fact that one will probably get longer due to some overhead. Compression needs a reasonable amount of data so that it can find patterns that repeat. Otherwise, the best it can due is trim some bits off your ASCII characters.

Regarding, "no matter how long the input is, the result will always be 50 characters long" ... I could write you an encryption program that does that, for free. But you can't afford the decryption utility. Ha!

Seriously, you can't compress data at-will, unless you're willing to live with losses. For example, you can compress a JPG pic or MP3 song to configurable degrees, but it's "lossy"... i.e. you lose data. (The JPG gets blurry/pixelated. The MP3 sounds like a bad robot singing.) It would be interesting if someone's created a lossy text compressor, but I imagine it would just skip some letters and hope you can still read it.