problems decompressing files

Chris Sheffield revlist at cableone.net
Wed Sep 10 16:37:00 EDT 2003


That'd work great if I new beforehand what I was compressing.  :-)  Most of
my files are wav and text files, and I don't really know exactly what is
being compressed before I compress it.  I suppose I could try reading the
data first to check it, but I'm not sure how I would check for multiple
occurrences of the same character in a row.

Chris Sheffield
Software Development
Read Naturally
csheffield at readnaturally.com


-----Original Message-----
From: use-revolution-admin at lists.runrev.com
[mailto:use-revolution-admin at lists.runrev.com] On Behalf Of Ken Ray
Sent: Wednesday, September 10, 2003 3:13 PM
To: use-revolution at lists.runrev.com
Subject: RE: problems decompressing files

Chris,

I'm not sure what you're storing that needs to be compressed, but if it
was a string like:

 10011101011111111111111111111111111001

Where there are too many "1"s in a row, couldn't you do something like:

 replace "0" with "0," in tString
 replace "1" with "1," in tString

giving you

 
1,0,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,1,

That you could then compress and decompress? Then to get back your
"original", you could:

 replace "," with "" in tString

to get you back to:

 10011101011111111111111111111111111001

Just a thought,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> 





More information about the use-livecode mailing list