Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!kth.se!cyklop.nada.kth.se!news From: d88-jwa@byse.nada.kth.se (Jon W{tte) Newsgroups: comp.compression Subject: Re: Self Extracting Files Message-ID: Date: 15 Jun 91 10:50:58 GMT References: <309pollarda@physc1.byu.edu> Sender: news@nada.kth.se (Mr News) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 49 In-reply-to: pollarda@physc1.byu.edu's message of 15 Jun 91 03:53:59 GMT In article <309pollarda@physc1.byu.edu> pollarda@physc1.byu.edu writes: combined somehow. But how exactly does it work? What tells the computer to stop loading in the file as machine code and handle the rest as data? It doesn't. Everything is loaded as code, but the flow in the program never reached the addresses where the data is. Look at it like a small program like: char stuffed_data [ ] = { 0 , 1 , .... } ; main () { while ( more_data ) { unstuff ( stuffed_data ) ; } } type foo.exe The Software (c) 19xx The Software Co. C:> Just add the text to the beginning with an end-of-file in there. Maybe some magic numbers still need to be there, but they can be erased by backspaces... I'm not so very at home with MS-DOS any longer. Now, on the mac, this info is in the "vers" resource and comes up when you "get info" on the icon - and a self-extrancter would have the code in the usual place (CODE resources) and the data in the data fork - so you could open it transparently with the original program as well, which doesn't need to look at the resource fork. A file system to die for ! :-) All of this has little to do with comp.compression, except maybe that archive writers need to be aware that not all file systems are flat... -- Jon W{tte h+@nada.kth.se - Speed !