Opentopia Directory Encyclopedia Tools

OSType

Encyclopedia : O : OS : OST : OSType


OSType (also known as FourCC or ResType) is the name of a four-byte type commonly used as an identifier in Mac OS. The four bytes could in principle have any binary value, though they are usually ASCII or characters from the Mac OS Roman character set.

OSType values were used to identify file data format types, as well as the applications that created them. The separation of file types and creators allowed the coexistence of documents of the same format belonging to different applications; it was easy to reassign the ownership of any of these documents to any supporting application, without changing its name or otherwise affecting its contents.

OSTypes were also used to identify the types of data in other places besides files: for instance, on the Clipboard or in resources, as well as in AppleEvents. They tended to have common meanings across these uses: for instance, 'TEXT' meant a block of text (encoding unspecified, but usually ASCII or Mac Roman), while 'PICT' meant a QuickDraw picture.

Four byte identifiers are useful because they can be made up of four human-readable characters with mnemonic qualities, while still fitting in the four byte memory space typically allocated for integers in 32-bit systems. From a memory management standpoint, they're more easy to handle than for example character strings of variable length. Compared to arbitrary 32-bit integer values, they are unambiguous since the byte-order is clearly defined.

Other uses for OSTypes were:

Other platforms

Similar four character codes are used to identify data types in many other operating systems and applications. These codes are generally referred to as FourCCs rather than OSTypes.

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: