Sujet : Re: ASCII to ASCII compression.
De : mikko.levanto (at) *nospam* iki.fi (Mikko)
Groupes : comp.lang.cDate : 07. Jun 2024, 05:47:00
Autres entêtes
Organisation : -
Message-ID : <v3u3c4$1ubqm$1@dont-email.me>
References : 1
User-Agent : Unison/2.2
On 2024-06-06 16:25:37 +0000, Malcolm McLean said:
Not strictly a C programming question, but smart people will see the relavance to the topicality, which is portability.
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?
There are compression algorithms that can be adapted to any possible
size of input and output character sets, including that both are
ASCII and that the output character set is a subset of the input set.
Restricting the input set to ASCII may be too strong. Files that should
be ASCII files sometimes contain non-ascii bytes. The output should be
restricted to the 94 visible characters but the decompressor should
accept at least full ASCII and skip the invalid characters as insignificant.
That permits addition of line brakes and perhaps other spaces that could
be useful for example when the file is printed for debugging.
-- Mikko