Ағылшыншамен салыстырыңыз: абзацты басыңыз — түпнұсқа терезеде ашылады. Абзац астындағы EN түймесі оны мәтін ішінде көрсетеді.
Мазмұны
Кіріспе
BinHex, бастапқыда "бинарлықтан гексадецималға" дегеннің қысқартылған түрі, бинарлық файлдарды электрондық пошта арқылы жіберу үшін классикалық Mac OS жүйесінде қолданылған бинарлықтан мәтінге кодтау жүйесі. Алғашқыда гексадецималды кодтау болған, BinHex-тің кейінгі нұсқалары uuencode-қа ұқсас, бірақ Mac файлдық жүйенің екі "тармағын" және кеңейтілген файл туралы ақпаратты біріктірді. BinHex форматындағы файлдар түпнұсқа файлдардан көбірек орын алады, бірақ "8 бит таза" емес бағдарламалық қамтамасыздан бұзылмайды.
BinHex, originally short for "binary to hexadecimal", is a binary to text encoding system that was used on the classic Mac OS for sending binary files through e mail. Originally a hexadecimal encoding, subsequent versions of BinHex are more similar to uuencode, but combined both "forks" of the Mac file system together along with extended file information. BinHexed files take up more space than the original files, but will not be corrupted by non "8 bit clean" software.
TRS-80 BinHex (.hex)
BinHex бастапқыда 1981 жылы Тим Манн TRS 80 үшін жазған, ол Ланс Микклз жасаған танымал терминал эмуляторы ST80 III-ге енгізілген кодтау схемасының жеке нұсқасы болды. BinHex, CompuServe сияқты ірі онлайн қызметтер арқылы файлдарды жіберу үшін қолданылды, олар "8 бит таза" болмағандықтан, сақталуы үшін ASCII қаптамасы қажет болды. Бірақ, барлығы ST 80 қолданбағандықтан, Манн BinHex-ті басқа терминалдарды пайдаланушыларға да форматты қолдануға мүмкіндік беру үшін жасады. Алғашқы ST 80 жүйесі бинарлық файлдың мазмұнын гексадецимал сандарға түрлендіріп, оларды ASCII цифрлары мен әріптері (0–9, A–F) арқылы кодтады. Содан кейін әр 60 символдан соң жаңа жол қосылды. Манн оны CompuServe-тің TRS 80 файлдар бөліміне жүктегеннен кейін жүйе кеңінен танымал болды. Жүйе тез арада әр жолдың соңына қателерді тексеру үшін тексеру сомасын қосты. Билл Стоквелл бұл нұсқаны Манннің интерпретацияланған нұсқасынан әлдеқайда жылдам жұмыс істейтін BASIC/S компиляторына аударды. BinHex файлдары сол кезде әдетте Ports деген файл кеңейтімімен сақталды. Көп ұзамай Apple II және сол дәуірдің басқа да танымал платформалары үшін де нұсқалар пайда болды. Кейін CompuServe 8 биттік жіберуді қолдады, соның салдарынан формат тез қолданыстан шықты.
BinHex was originally written in 1981 by Tim Mann for the TRS 80 as a standalone version of an encoding scheme originally built into a popular terminal emulator, ST80 III by Lance Micklus. BinHex was used for sending files via major online services, such as CompuServe, which were not "8 bit clean" and required ASCII armoring to survive. Not everyone used ST 80, however, so Mann wrote BinHex to allow users of other terminals to use the format. The original ST 80 system worked by converting the binary file contents to hexadecimal numbers, which were encoded as ASCII digits and letters (0–9, A–F). It then added a newline after every 60 characters. The system became very popular after Mann uploaded it to CompuServe's TRS 80 files area. The system quickly gained the addition of a checksum at the end of every line to check for errors. Bill Stockwell converted that version to the BASIC/S compiler, which ran much faster than Mann's interpreted version. BinHex files of the era were typically given the file extension Ports soon appeared for other popular platforms of the era, including the Apple II. CompuServe later added support for 8 bit transfers, and the format quickly disappeared.
Mac BinHex (.hex)
Mac 1984 жылы алғаш рет шыққан кезде CompuServe-де файлдарды жүктеу мәселесі әлі де болды. 1984 жылдың сәуірінде Уильям Дэвис BinHex-ті Mac-ке Microsoft BASIC-ті пайдаланып, сол дәуірдегі TRS 80 нұсқаларымен салыстырмалы нұсқаны көшірді. Бұл нұсқа ресурс бөлімін қаназдайтын "деректер бөлімінің" шифрлануын ғана қолдады, яғни оны дерек файлдары үшін ғана пайдалануға болады. Macintosh-тың шығуымен бірге Интернет электрондық поштасын қолдану да көбейді, ал Дэвистің нұсқасын 1984 жылдың маусым айында Джоэл Хеллер Info Mac пошта тізіміне жариялады. 1984 жылы бірнеше жаңа нұсқалар шықты, нәтижесінде BinHex 3 екі бөлімді де шифрлей алатын болды. Mac үшін алғашқы ассемблер, MacASM-нің авторы Ив Лемпьер, өз файлдарын CompuServe-ке жүктеу үшін BinHex-ті пайдалануға мәжбүр болды. BASIC нұсқасы өте баяу болғандықтан, Лемпьер BinHex 3-ті ассемблерге көшіріп, оны BinHex 1.0 ретінде шығарды. Бағдарлама BASIC нұсқасынан шамамен жүз есе жылдам болды, және көп ұзамай жаңарту туралы өтініштер көптеп түсе бастады.
The file upload problem still existed on CompuServe when the Mac was first released in 1984. In April 1984, William Davis ported BinHex to the Mac using Microsoft BASIC to produce a version that was largely identical to the TRS 80 versions of the same era. This version only supported encoding of the "data fork", ignoring the resource fork, which meant it could only be used for data files. The rise in use of Internet e mail coincided roughly with the release of the Macintosh, and Davis's version was posted on the Info Mac mailing list by Joel Heller in June 1984. Several newer versions were published during 1984, resulting in BinHex 3 that could encode both forks. Yves Lempereur, author of the first assembler for the Mac, MacASM, found that in order to upload his files to CompuServe he had to use BinHex. The BASIC version was very slow, so Lempereur ported BinHex 3 to assembler and released it as BinHex 1.0. The program was roughly a hundred times as fast as the BASIC version, and soon upgrade requests were flooding in.
Compact BinHex (.hcx)
Бастапқы BinHex өте қарапайым формат болды, ол тиімді емес еді, себебі кіріс деректегі әрбір байтты гексадецималдық бейнелеу талабына сәйкес екі есеге дейін кеңейтті – 8-ден 4 биттік кодтау. BinHex 2.0 үшін Lempereur файл мөлшерін 50%-ға дейін азайтатын жаңа 8-ден 6-ға дейінгі кодтауды пайдаланды. Ол сондай-ақ тексеру қосындысын 8 биттен 16 битке дейін кеңейту мүмкіндігін пайдаланды. Бұл жаңа кодтау деректерді көрсету үшін алғашқы 64 ASCII басылатын таңбаларды, бос орынды қоса алғанда, uuencode сияқты пайдаланды. Жаңа кодтау енді гексадецималдық сипатқа ие болмаса да, бағдарламаның бұрынғы аты сақталды. Шағын файлдар ескі файлдармен үйлесімсіз болды, сондықтан кеңейту hcx, мұндағы "c" – "жинақы" дегенді білдірді. Жаңа нұсқа бұрынғыларын "бір түнді өткізіп" толығымен алмастырды.
The original BinHex was a fairly simple format, one that was not very efficient because it expanded every byte of input into two, as required by the hexadecimal representation—an 8 to 4 bit encoding. For BinHex 2.0, Lempereur used a new 8 to 6 encoding that decreased file size by 50%. He also took the opportunity to expand the checksum from 8 to 16 bits. This new encoding used the first 64 ASCII printing characters, including the space, to represent the data, similarly to uuencode. Even though the new encoding was no longer hexadecimal in nature, the established name of the program was retained. The smaller files were incompatible with the older ones, so the extension became hcx, c for compact. The new version replaced the earlier ones "overnight".
BinHex 4 (.hqx)
Лемпёр BinHex-тің кейбір ерекшеліктері, атап айтқанда, циклдық артық кодты тексерудің (CRC) орнына тексеру сомасын пайдалануы және бас жағындағы метадеректер ақпаратының қарапайым мәтін түрінде болуы, осылайша деректер сияқты бұзылуы мүмкін екендігі туралы алаңдады. Осы мәселелердің бәрін шешу үшін Лемпёр 1985 жылы BinHex 4.0 нұсқасын шығарды, бұрынғы, қазірде қолданылмайтын BASIC нұсқасымен шатасуды болдырмау үшін 3.0 нұсқасын өткізіп кетті. 4.0 нұсқасы алдымен деректер тармағын, ресурс тармағын және файл метадеректерін ортақ 8 биттік форматқа біріктірді, кейбір қысылуды қамтамасыз ету үшін нәтижесінде жүріс ұзындығын кодтауды (RLE) қолданды, содан кейін нәтижесінде 8 > 6 түрлендіруін жасады және барлығын бірнеше CRC арқылы қорғады. Соның нәтижесінде алынған hqx файлдары hcx файлдарымен шамамен бірдей өлшемде болды, бірақ әлдеқайда сенімдірек болды.
Lempereur had concerns about some of the features of BinHex, notably its use of a checksum instead of a cyclic redundancy check (CRC) and the fact that the metadata information in the header was in plain text and thus could be corrupted in the same way as the data. In order to solve all of these problems, Lempereur released BinHex 4.0 in 1985, skipping 3.0 to avoid confusion with the now long dead BASIC version. 4.0 first combined the data fork, resource fork and file metadata into a common 8 bit format, ran run length encoding (RLE) on the result to provide some compression, and then ran the 8 >6 conversion on the result and protected everything with multiple CRCs. The resulting hqx files were roughly the same size of the hcx's, but much more robust.
BinHex 5
BinHex 4 шығарылған шамамен, көптеген онлайн қызметтер ZMODEM сияқты сенімді 8 биттік файлдарды жіберу протоколдарын қолдауды бастады, соның салдарынан ASCII арнайы кодтау қажеттілігі жойылды. Дегенмен, бұл Mac жүйесінде мәселені шешпеді, себебі екі бөлімді (fork) біріктіру қажеттілігі әлі де болды. Macintosh коммуникациялық бағдарламашыларының бірлескен еңбегі, соның ішінде Lempereur, MacBinary-ге әкелді. Бұл файлдар бөлімдердің мазмұнын бастапқы 8 биттік форматта сақтап, оларды қабылдау кезінде біріктіру үшін қарапайым тақырыпша қосты; MacBinary файлдары BinHex файлдарынан әлдеқайда кіші болды. Lempereur BinHex 5.0 нұсқасын шығарды, ол 4.0 нұсқасына ұқсас болды, бірақ 8-ден 6-ға кодтауды жүргізу алдында бөлімдерді біріктіру үшін MacBinary қолданды. Ол күткендей, бұл нұсқа кеңінен қолданылмады. Интернетте электрондық пошта файлдарды таратудың басты тәсілі болып қала берді. Ол кезде Интернетке толық қол жеткізе алатын адамдар аз болды, ал FTPmail сияқты қызметтер көптеген пайдаланушылар үшін файлдарды жүктеудің жалғыз жолы еді. Бірнеше жыл өткен соң, Lempereur алғаш рет Интернетке қосылғанда, BinHex 4.0 әлі де өте танымал екеніне таң қалды. Осы мақсатқа MacBinary немесе AppleSingle арқылы екі бөлімді біріктіріп, содан кейін Uuencode немесе Base64 қолдану арқылы қол жеткізуге болар еді, бірақ ешқайсысы бұл шешімдер кеңінен танымал болған жоқ, ал BinHex 4.0 1990-шы жылдардың соңына дейін қолданыста болды. Классикалық Mac OS бағдарламалық қамтамасының файлдық архивтері әлі де BinHex форматталған файлдармен толы.
At about the time BinHex 4 was released, most online services started supporting robust 8 bit file transfer protocols such as ZMODEM, and the need for ASCII armoring went away. This left a problem on the Mac, however, as there was still the need to encode the two forks into one. A team effort among Macintosh communications programmers, including Lempereur, resulted in MacBinary. These bin files left the contents of the forks in their original 8 bit format and added a simple header for combining them on reception; MacBinary files were thus much smaller than BinHex. Lempereur released BinHex 5.0, almost identical to 4.0 with the exception that it used MacBinary to combine the forks before running the 8 to 6 encoding. This saw little use, as he expected. On the Internet, e mail was still the primary method of moving files. At the time, relatively few people had full access to the Internet, and services like FTPmail were the only way many users could download files. Years later when he first got onto the Internet, Lempereur was surprised to find that BinHex 4.0 was still extremely popular. The same ends could be achieved by first using MacBinary or AppleSingle to combine the forks, and then using Uuencode or Base64 on the resulting file, but none of these solutions ever became popular and BinHex 4.0 survived well into the late 1990s. File archives of classic Mac OS software are still filled with BinHexed files.