Burrows–Wheeler transform

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Burrows–Wheeler transform

Post by capellan » Sun Dec 30, 2018 3:14 am

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
(8.65 KiB) Downloaded 26 times

capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Burrows–Wheeler transform

Post by capellan » Mon Jan 07, 2019 12:23 am

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

bogs
Posts: 3799
Joined: Sat Feb 25, 2017 10:45 pm

Re: Burrows–Wheeler transform

Post by bogs » Mon Jan 07, 2019 9:21 am

Very nice Al!
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2122
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Burrows–Wheeler transform

Post by [-hh] » Tue Jan 08, 2019 11:59 am

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).
shiftLock happens

capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Burrows–Wheeler transform

Post by capellan » Tue Jan 08, 2019 3:47 pm

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]

Post Reply

Return to “Talking LiveCode”