Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
методичка английский.doc
Скачиваний:
13
Добавлен:
21.09.2019
Размер:
675.33 Кб
Скачать

Текст II

To permit

Позволять, разрешать, допускать (of)

Memo, pl.memos (informal for memorandum)

Adequate

Соответствующий, достаточный

To allocate

Размещать, определять место, распределять, назначать

To suppose

Предполагать, полагать, допускать

To treat

Обращаться, лечить, трактовать

To represent

Изображать, представлять, излагать

To fit

Соответствовать, подходить, снабжать/with

To pack

Упаковывать (ся), заполнять

Задание 1. Прочтите Текст II очень внимательно

FIXED-LENGTH ONTO FIXED-LENGTH MAPPING

Our first category of methods compresses by mapping fixed-length portions of the input file onto fixed -length codes. Clearly, for space to be saved, the number of bits per character in the output file must be less than in the input file.

A typical computer system uses an 8-bit byte for each character in a text file. In theory this permits a 256-character alphabet. However, for some types of file, for example program source files or inter-office memos, a much smaller alphabet may be adequate. Thus we might compress simply by allocating smaller fixed-length codes to fixed size units of the input file.

Suppose our input file has a 30-character alphabet; perhaps we are compressing mailgrams with only a few symbols in addition to the upper case letters. We can allocate each character a 5-bit code, pack three charac­ters into a 16-bit word that normally only holds two and compress a file to two-thirds its size.

In general, the compressed units can be N-character segments of the input file. Suppose, for example, that our input file uses a 40-character alphabet. Compress­ing a character at a time means that each requires 6 bits and we can still hold only two in a 16-bit word. However, we can treat a 3-character section of the file as a base 40 number and represent it by the corresponding binary value. There are 40 x 40 x 40 =64,000 combinations of three characters; this value is just small enough to fit into a 16-bit word. However, we can treat a 3-character section of the file as a base 40 number and represent it by the corresponding binary value. There are 40, x 40 x 40 = 64,000 combinations of three characters; this value is just small enough to fit into a 16-bit word (0-65,535). Thus a file with a 40-character alphabet can also be compressed to two-thirds its normal size.

Standard FORTRAN-77 requires only 49 characters (di­gits, upper case letters, and 13 special characters (+-*/(),.$': and space). Using either of the techniques above we can pack five characters into a 32-bit word. Using an 8-bit code we could only pack four characters, thus we can compress a FORTRAN-77 text to 80% of normal size. In most text, input sections occur with diffe­rent frequencies, for example, in English, "e" is more common than "x". We may achieve a greater degree of compression by having shorter output codes for commoner sections and longer codes for those that occur less often. In the next section we look at methods that use, variable-length output codes.