Re-2: compress <-> revZip
Claus Dreischer
claus at dreischer.de
Sun Oct 11 07:06:35 EDT 2009
Hi David,
interesting idea!
Unfortunately i can't control the "other" side (the uncompressing side)
so i have to stick with normal compression.
Thanks for the reply,
Claus.
Phil Davis schrieb:
> Hi Claus,
>
> It seems like you could compress a very large file by
> reading/compressing/writing one chunk (say 10 MB) at a time, until you
> have compressed the entire file. This approach would use the "open file
> / read from file / write to file / close file" approach instead of "get
> url / put x after url". That way only 10 MB of the file (in my example)
> would be in memory at any time.
>
> This approach would require that the decompression tool be a custom
> tool. So if you are creating a solution that is Rev from end to end,
> this could work! Otherwise it won't.
>
> Problem: When compressed, each 10 MB chunk will have some unpredictable
> size. You would have to make a way for the decompression tool to know
> the length of each compressed chunk in the file.
>
> One possible solution: Keep track of the compressed sizes as you
> compress each chunk, and write all the sizes (comma-delimited) to the
> output file as a header record when all compression is finished. Then
> the decompression tool would start by reading the header record. The
> numbers in the header tell the decompress tool how much data to grab in
> each read.
>
> Food for thought -
> Phil Davis
More information about the use-livecode
mailing list