Re: Extended Hamming encode/decode



Jon Kirwan wrote:
Vladimir Vassilevsky wrote:
If your goal is the absolutely the smallest code, Meggit decoder is a way to go. It is going to be rather slow though. It only takes ~10 lines
of code to decode either of the codes; the decoder is going to be identical except for a couple of constants.
I've never heard of Meggit, however SECDED is often good enough
when speed is needed, for example in real-time communications
(radio or long wires anyone ?)

I'll look at it. I'd looked on the web for a short bit and
found abstract and overly large examples. But I don't recall
checking that one out yet and it should be worth a moment to
look, I suspect.
tell us what you end up with :-)

The code I wrote is already done and if it suits anyone, it's
there. After looking over a few on the web, I gave up hoping
to find something that fit the need for decent speed _and_
size at one time and just decided to "do it" and move on. But
thanks for the pointer. I'll look it over, tomorrow.
I've just downloaded it and had a very short look, and even
tried to run the test :
$ gcc hamm_08.h hamm_08.c hamm.c -o hamm
$ ./hamm 1 2 3
(stuffs are displayed)

so it seems to work and to be good enough for me :-)

In the meantime, I found a way to slightly shorten and speed
things up in my case and have moved that version into the old
slot on that link I gave.
great !

thanks for the .zip,

Jon
yg

--
http://ygdes.com / http://yasep.org
.