gzip & Mac File Types

Rob Cozens rcozens at pon.net
Sat Sep 14 18:17:01 CDT 2002


>I wonder if there are any OS X command line tools available to 
>binhex the file before compressing it into gzip. That would retain 
>the resource fork + type and creator code, wouldn't it?

Brad, et al:

That may be an issue I'll have to deal with in the future.  Right now 
my goal is a utility to compress/decompress revolution stacks and 
text files across all platforms RR supports; so the resource fork 
does not come into play.

One of the advantages of using a custom format (I'm appending eight 
characters to the end of the data before compressing and striping 
them off after decompressing) is that I can include logic to 
recognize that Unix & Windows files ending in .rev default to 
fileType "revoRSTK" and those ending in .txt default to "ttxtTEXT". 
(If someone will provide me with the fileType for MetaCard stacks, 
I'll default .mc to that also).

This means stacks transferred to Macs from Unix or Windows will have 
the correct Creator/File Type set automatically upon decompression. 
If the foreign (to Mac) file has a different extension, "????????" is 
passed as fileType, and the decompression handler opens an ask dialog 
(on Macs) asking for the creator/type code.
-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"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