Zipping files

Phil Davis revdev at pdslabs.net
Wed Jan 31 13:45:20 EST 2007


Hi Jacque,

If you're concerned about RAM usage, you could use the open/read/close file 
approach and compress the file into the custom props of a stack 100K or so at a 
time, and save the stack when done. Then to decompress, reverse the process - 
decompress one custom prop at a time (in the same order as compressed, of 
course) and write it after a new file.

I'm assuming this approach would be easier on RAM, but haven't verified it. 
Also, by using a 'send.. in 0 secs' approach to compress each file segment, you 
can make the process play nice with UI activity.

food for thought -
Phil Davis


J. Landman Gay wrote:
> I need to compress large-ish files, around 50-100 megs each. I wonder if 
> anyone knows whether zip or gz format is easier on RAM. Is it correct 
> that both methods require about double the amount of RAM as the file 
> size? Is one preferable over the other under low memory conditions? Are 
> there any other considerations when choosing between the two?
> 



More information about the use-livecode mailing list