compress/decompress on OS X

Rob Cozens rcozens at
Fri Nov 5 11:18:36 CST 2004

>My solution (from Serendipity Library & called by SDB Utilities and 
>SDB Tools) is below;

In minimizing the Libray handlers for my second post, I found these 
errors in the original logic:

on SDBCompressFile -- 3 Mar 04:RCC
     put compressedData into URL compressedFile
     set the fileType to savedFileType -- Replaces the result of "put"
     if the result is not empty then  -- Refers to result of "set"
end SDBCompressFile

on SDBExpandFile -- 3 Mar 04:RCC
      put item 2 of recordFooter into dataForkBytes
      put item 3 of recordFooter into resourceForkBytes -- This 
statement missing
     if resourceForkBytes <> 0 then -- resourceForkBytes never initialized
     put the fileType into savedType -- Should be savedFileType
     set the fileType to savedFileType -- savedFileType never initialized
end SDBExpandFile

The Library scripts have been corrected, and an updated copy of the 
Library is available at 

I have also added downloader links to SDB_Tools & Serendipity_Library 
in Revolution stack format.  These two files are all that you need if 
you're only interested in compression/decompression--or you're 
working on a Windows platform and don't want to wait for me to get 
around to publishing a file bundle for Windows...

but you really should look at the documentation and sample stacks, 
sez I.                   :{`)

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)

More information about the use-livecode mailing list