Sujet : Re: ASCII to ASCII compression.
De : ben (at) *nospam* bsb.me.uk (Ben Bacarisse)
Groupes : comp.lang.cDate : 06. Jun 2024, 17:56:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <874ja657s9.fsf@bsb.me.uk>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13)
Malcolm McLean <
malcolm.arthur.mclean@gmail.com> writes:
Not strictly a C programming question, but smart people will see the
relavance to the topicality, which is portability.
I must not be smart as I can't see any connection to the topic of this
group!
Is there a compresiion algorthim which converts human language ASCII text
to compressed ASCII, preferably only "isgraph" characters?
>
So "Mary had a little lamb, its fleece was white as snow".
>
Would become
>
QWE£$543GtT£$"||x|VVBB?
Obviously such algorithms exist. One that is used a lot is just base64
encoding of binary compressed text, but that won't beat something
specifically crafted for the task which is presumably what you are
asking for. I don't know of anything aimed at that task specifically.
One thing you should specify is whether you need it to work on small
texts, or, even better, at what sort of size you want the pay-off to
start to kick in. For example, the xz+base64 encoding of the complete
works of Shakespeare is still less than 40% of the size of the original
but your single line will end up much larger using that off-the-shelf
scheme.
-- Ben.