Re: [NTLK] NCU

From: Morgan Aldridge (makkintosshu_at_mac.com)
Date: Tue Oct 18 2005 - 06:14:22 PDT


The ASCII vs. Binary issue stems from the fact that Macs have been big
endian (00000001 == 1, 00000011 == 3, etc.) while PCs have been little
endian (10000000 == 1, 11000000 == 3, etc.), so a Mac had to know what
was binary (it's either got type & creator codes or an extension I
understand -- the latter added with the PC Exchange control panel and
then later extended with Internet Config which by Mac OS 8 was built
into the OS -- or I will not be able to read it) or Text (which the
browser would often do endian swapping to make it more easily readable
natively. The browsers would also set the type and creator codes to
those for text files so that you could just double-click the file and
it'd open up in TeachText/SimpleText (or any other editor you'd
designated to handle text files).

Note: This big-endian vs. little-endian naming convention comes from
Gulliver's Travels.

Mac OS X, though still currently run on big endian processors (the
PowerPC line), was designed to care very little about what kind of
processor it's actually running on. Most libraries can automatically do
the endian swapping and most developers SHOULD design their
applications robustly enough to be ported (Mac OS X applications, that
is... something like a Newton application, well, there's nothing that's
really going to be able to use the same code base and compile for
another OS or platform, so it's a non issue).

With that in mind, Safari actually nearly always downloads as binary
anyway. If you want to force something to be downloaded in the same
format that it's stored on the server (i.e. binary, for things like
packages on UNNA) you can right-click (or control-click, if you don't
have a two-button mouse) on the link to the file (giving you a
contextual menu) and select "Download Linked File". Or, hold down the
Option key and it'll change to "Download Linked File As..." and you can
download it to a location other than your download folder (Specified in
Safari's preferences or in the Internet pane in System Preferences if
you're running an old version of Mac OS X... 10.2, Jaguar or earlier, I
believe).

Also, compressed files, such as those that have been compressed with
StuffIt! have a checksum stored in them so that the application can
verify that every bit has come through as it was originally stored.
This is usually before the archive is uncompressed and you would
definitely get an error during the uncompressing/unstuffing process if
some bits were off. So, with that in mind, if a file uncompresses
successfully, it was downloaded fine.

Morgan Aldridge

--
morgant_at_makkintosshu.com
http://www.makkintosshu.com/
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Tue Oct 18 2005 - 06:30:08 PDT