Fibonacci Coding Within The Burrows-Wheeler Compression Scheme
Fibonacci Coding Within The Burrows-Wheeler Compression Scheme
(1)
28
Also referred to as Shannon’s entropy, BWT sort approaches are Bentley-Sedgewick sort
represents the minimum average number of bits required to (modification of quick sort) and suffix sort. Both have their
encode one symbol of . An equivalent formulation of this advantages and disadvantages, but we will not develop this
fact is point here. For a deeper discussion of these algorithms we
refer the reader to [5] – [8].
(3)
where denotes archiver output file size in bytes
and is given by
(4)
(5)
29
Distance Coding property by our calculations on the Canterbury Corpus
files [10].
Distance Coding (DC) was originally proposed by 1. Unlike MTF, DC truncates input on the account of
Edgar Binder at comp.compression newsgroup [9] in 2000. homogenous chains in (Fig. 7)
There is no official paper on DC by Edgar, so we provide
the algorithm (Fig. 6) here:
Fig. 6. DC algorithm for string "rccrsaaaa" 3. Since MTF encodes each symbol by its index in ,
we have . DC measures distance between
1. Fix . Someway mark identical symbols, and hence can contain
symbols yet to be encoded (encircled in our example). numbers up to (Fig. 9)
2. Encode the next message symbol by the number of
unencoded (encircled) characters till the next
occurrence of (or end-of-file pointer if there are no
-as left).
3. Unmark the second .
4. Repeat steps 2 and 3 until the whole message is
encoded.
Assume we are encoding symbol , whose right
neighbor is not yet encoded. This clearly forces
, since otherwise some other symbol would have
already pointed to . Such deduction allows us not to
encode it any extra (steps 6, 10, 11 and 12), this way
shortening DC output:
30
The practical advantage of using Fibonacci Code
within BWT + DC scheme lies in the fact that FC is
universal code, hence there is no need to store bulky
alphabet. Let us compare our implementation of the BWA
scheme to some other data compressors performance on
the relatively large text files (Fig. 11):
Fibonacci Coding
Any positive integer can be represented as the Fig. 11. Canterbury Corpus .txt files: – length in bytes;
and – theoretical lower bounds in bytes for
sum
various data compression techniques (4); zip – popular
commercial file archiver [12]; bzip2 – one of the best open source
(6) BWA implementations [13]
R. Bastys. Fibonacci Coding Within the Burrows-Wheeler Compression Scheme // Electronics and Electrical Engineering. –
Kaunas: Technologija, 2010. – No. 1(97). – P. 28–32.
Burrows-Wheeler data compression algorithm (BWA) is one of the most effective textual data compressors. BWA includes three
main iterations: Burrows-Wheeler transform (BWT), Move-To-Front transformation (MTF) and some zeroth order entropy encoder (e.g.
Huffman). The paper discusses little investigated scheme when MTF is replaced by the less popular Distance Coding (DC). Some
relevant advantages and downsides of such modified scheme are indicated, the most critical being heavy DC output alphabet. It is shown
that applying Fibonacci Code instead of entropy encoder elegantly deals with this technical problem. The results we obtain on the
Canterbury Corpus text files are very close to the theoretical lower bounds. Our compressor outperforms the most widely used
commercial zip archiver and achieves sophisticated BWA implementation bzip2 compression. Ill. 11, bibl. 14, tabl. 1 (in English;
abstracts in English, Russian and Lithuanian).
P. Бастис. Код Фибоначчи использование в схеме сжатия данных Барроуза-Вилера // Электроника и электротехника. –
Каунас: Технология, 2010. – № 1(97). – C. 28–32.
Алгоритм Барроуза-Вилера (BWA) является одним из наиболее эффективных методов сжатия текстовых данных. BWA
включает три основных итерации: преобразование Барроуза-Вилера (BWT), трансформацию Move-To-Front (MTF) и
энтропийный код (например, Хафмана). В статье анализируется мало исследованная схема, когда MTF заменяется
кодированием расстояний (англ. Distance Coding). Приводятся основные плюсы и недостатки модифицированного BWA, среди
которых черезмерно большой алфавит идентифицируется как основной. Для решения этой технической проблемы
предлагается универсальный код Фибоначчи. Его използование на третьем шаге BWA с текстовыми данными позволяет
достичь результаты весьма близкие к теоретическим. Описываемый алгоритм сжатия данных также превосходит популярный
коммерческий архиватор zip и близок по эффективности к намного более сложной BWA реализации bzip2. Ил. 11, библ. 14,
табл. 1 (на английском языке; рефераты на английском, русском и литовском яз.).
R. Bastys. Fibonačio kodo panaudojimas Burrowso ir Wheelerio duomenų kompresijos schemoje // Elektronika ir
elektrotechnika. – Kaunas: Technologija, 2010. – Nr. 1(97). – P. 28–32.
Burrowso ir Wheelerio duomenų kompresijos algoritmas (BWA) yra vienas efektyviausių tekstinių duomenų archyvavimo metodų.
BWA jungia tris iteracijas: Burrowso ir Wheelerio transformaciją (BWT), Move-To-Front transformaciją (MTF) ir pasirinktą entropinį
kodą (pavyzdžiui, Hafmano). Straipsnyje analizuojama mažai išnagrinėta schema, kai MTF pakeičiamas atstumų kodavimu. Nurodomi
modifikuoto algoritmo pranašumai ir trūkumai, palyginti su klasikiniu BWA, identifikuojama pagrindinė techninė problema – perteklinė
abėcėlė. Jai spręsti pasitelkiamas universalus Fibonačio kodas, leidžiantis išvengti abėcėlės saugojimo sąnaudas. Rezultatai, pasiekti
koduojant tekstinius duomenis aprašoma schema, yra labai artimi teoriniams. Pateikiamo algoritmo efektyvumas pranoksta plačiai
naudojamą komercinį archyvatorių zip ir yra panašus į vienos sudėtingiausių BWA realizacijų (bzip2) suspaudimo koeficientą. Il. 11,
bibl. 14, lent. 1 (anglų kalba; santraukos anglų, rusų ir lietuvių k.).
32