flat assembler
Message board for the users of flat assembler.

Index > Main > My range coder does not work properly (need help)!

Author
Thread Post new topic Reply to topic
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Could someone help me!
I wrote range coder (thing similar to arithmetic coder) based on program written in C by Michael Schindler http://www.compressconsult.com and article by Arturo Campos, but it doesn't work!
Their coders work properly.
I think that bug is in my decoder.
Thanks in advance to anyone who will find the bug!


Description: My buggy (!) range coder
Download
Filename: my_rangecoder.tar.gz
Filesize: 3.11 KB
Downloaded: 456 Time(s)



Last edited by donkey7 on 03 Feb 2005, 15:18; edited 1 time in total
Post 31 Jan 2005, 21:58
View user's profile Send private message Visit poster's website Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
I see that nobody is interested in my range coder.
So I will abandon this project, though I thought about some improvements to algorithm like multiplies before divisions, incrementing precision (place carry bit in separate variable), using 64-bit arithmetic etc.
Please reply quickly.
Post 02 Feb 2005, 16:33
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
donkey7 wrote:
Please reply quickly.

Hm, it is message board, not a chat...

...and what actuall is "range coder" ?

Regards.
Post 02 Feb 2005, 16:36
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Range coder is an entropy coder similar to arithmetic coder. It works by assigning less bits to more frequent symbols (eg. for string 'aaabc' it will assign one bit to symbol 'a', and two bits for symbols 'b' and 'c').

The main difference between arithmetic coder is that range coder outputs bytes instead of bits. Also huffman coder (another entropy coder) can not assign an non integer number of bits to a symbol.

If you are not experienced with entropy coders please refer to Arturo Campos and Michael Schindlers websites (I based on their work).
Post 02 Feb 2005, 16:45
View user's profile Send private message Visit poster's website Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85
I know a bit of theory about arithmetic coder, indeed it acts upon ranges too. But I don't remember to have saw any reference about your 'range coder' in literature(Sedgewick, Knuth, etc)

The World Wide Web wrote:
The range encoder is an entropy coder similar to the arithmetic coder or huffman coder. Compared to an arithmetic coder the files are minimally larger (less than 0.01% in most cases) but the operation speed is nearly twice as fast.

Seems pretty good.

_________________
"I assemble, therefore I am"

If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap
Post 02 Feb 2005, 21:06
View user's profile Send private message Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
I need an range coder because I want to write an universal file compressor. I wrote recently an Huffman coder that provides (in most cases) better compression than range coder. So I see that my range coder needs a lot of improvements, but I can't incorporate them because my range coder DOESN'T WORK PROPERLY.

When writing my range coder I based on articles from web, and I almost never refer to literature.
Post 03 Feb 2005, 10:37
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.