انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

The Golumb code:

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 4
أستاذ المادة محمد عبيد مهدي الجبوري       12/26/2011 9:58:15 PM
The Golumb code:
The Golomb code for non- negative integer n can be an effective Huffman code. The code depends on the choice of parameter b. the first step is to compute the two quantities
q=?(n-1)/b?, r=n-qb-1
Following which, the code is constructed of two parts; the first is the value of q+1, coded in unary, and the second, the binary value of r coded in either ?log_2 b? bits (for the small remainders) or in ?log_2?b ? bits (for the large ones).
Choosing b=3, e.g., produces three possible remainders 0,1 and 2. They are coded 0, 10, 11 respectively. Choosing b=5 produces the five remainders 0 through 4, which are coded 00, 01, 100, 101 and 110. Table shows some examples of the Golomb code for b=3 and b=5
n: 1 2 3 4 5 6 7
b=3 0:0 0:10 0:11 10:0 10:10 10:11 110:0
b=5 0:00 0:01 0:100 0:101 0:110 10:00 10:01

LZ77
This is an important and widely-used example of adictionary compression algorithm.These algorithms replace entire strings of characters by a single token – only the most common strings are
represented by these tokens (which are maintained in a
dictionary!).LZ77 was invented by Abraham Lempel and Jacob Ziv in
1977 and forms the basis for the gzip utility...

LZ77
This is achieved by considering the data to be encoded as a
stream...As the stream of data passes through the encoder parts
of it are stored in two buffers:the history buffer stores the symbols that have just been encoded (typically the last few thousand),
the lookahead buffer stores the next few symbols about to be encoded (typically 20 or so). If any string of characters in the lookahead buffer already appears in the history buffer then it is encoded by a token which points to the position in the history
buffer where that string can be found!

LZ77 Example
To illustrate the LZ77 sliding window:
COMPRESS_DATA_USING_DATA_COMPRESSION
COMPRESS_DATA_USING[11,6][25,8]ION

Notes on LZ77
Note that we do not discuss implementation details for
this algorithm here – just the overall idea: see http://www.data-compression.com/lossless.html if you are interested in the detail (contains an animation too).
There is a start up cost associated with filling the history buffer.
It is not worth encoding strings of just two or three characters: usually the minimum length worth encoding
is 4 ASCII characters.



المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .