Page 1 of 1

Burrows–Wheeler transform

Posted: Sun Dec 30, 2018 3:14 am
by capellan
Hi All,

Today, I found this old stack and cleaned it a bit before posting.
Maybe this old stack could works as a starting point for someone
who needs to use it:

The Burrows–Wheeler transform (BWT, also called block-sorting compression)
rearranges a character string into runs of similar characters.

This is useful for compression, since it tends to be easy to compress a string
that has runs of repeated characters by techniques such as move-to-front
transform and run-length encoding.

More importantly, the transformation is reversible, without needing to store
any additional data.

The BWT is thus a "free" method of improving the efficiency of text compression
algorithms, costing only some extra computation.

Al
Burrows Wheeler Transform v02.zip

Re: Burrows–Wheeler transform

Posted: Mon Jan 07, 2019 12:23 am
by capellan
Looks like I forgot to include the first and last characters
in the code. Please, also check online other BWT implementations.
For example:
https://rosettacode.org/wiki/Burrows%E2 ... _transform

Al

Re: Burrows–Wheeler transform

Posted: Mon Jan 07, 2019 9:21 am
by bogs
Very nice Al!

Re: Burrows–Wheeler transform

Posted: Tue Jan 08, 2019 11:59 am
by [-hh]
Hi Al.

Here in the forum your post will soon get cold. Why don't you add your code to rosettacode?
There are already several LiveCode contributions there (most of them by Geoff).

Re: Burrows–Wheeler transform

Posted: Tue Jan 08, 2019 3:47 pm
by capellan
Hi Bogs and Hermann,

Thanks a lot for taking time for checking this post. :D
Hermann wrote:
Here in the forum your post will soon get cold. Why don't you add your code to rosettacode?
There are already several LiveCode contributions there (most of them by Geoff).
I will check how I could do this. Now there are many more LiveCode examples
in Rosetta Code than the last time I visited them:

https://rosettacode.org/wiki/Category:LiveCode

Al

[EDIT: Now I remember that years ago, I had posted a CRC32 livecode script.
I will try to find it and test thoroughly before including in Rosetta Code]