Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!zodiac.ukc.ac.uk!cur022 From: cur022%cluster@ukc.ac.uk (Bob Eager) Newsgroups: comp.sources.wanted Subject: Re: want to compress ascii text in strings not files Message-ID: <21552.278c38e5@cluster@ukc.ac.uk> Date: 10 Jan 91 09:50:29 GMT References: <1991Jan9.053459.13231@watmath.waterloo.edu> Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 20 In article <1991Jan9.053459.13231@watmath.waterloo.edu>, kgdykes@watmath.waterloo.edu (Ken Dykes) writes: > is there an effective algorithm (what is it? :-) or even lazier a C source > for a function (pascal, 286 assembler can also be survived :-) > which will reduce in-memory requirements for strings. I have a small C program that takes a file of strings (and message numbers) as input, and generates two constant arrays and a tiny function for retrieving any given message by number. It stores each English word once, and each message is stored as a set of pointers to the words. Letters are stored as 6 bit characters with a shift character to get the punctuation stuff. If there is enough interest, I'll post it. -------------------------+------------------------------------------------- Bob Eager | University of Kent at Canterbury | +44 227 764000 ext 7589 -------------------------+-------------------------------------------------