How can I add some detection or correction code in a 48bits message?

550 views Asked by At

I'm developing a OCR tool reeds a set of symbols which represent 2 bits each.

For example:
{ ---> 00
} ----> 01

Always I have a 48 bits code so I have 24 symbols.

I need to implement a detector or correction of errors in Objective-c (I'm developing an application for Mac). My only requirement is that the code is as small as possible. I have a 48-bit (which represents 24 Sibol) and do not want to add many more to my design.

I have tried to implement this code: http://code.google.com/p/rscode-objc/

But it is outdated, I get many errors and is designed for messages of 255 bytes (and of course I do not know how to adapt). If somebody can help me to adapt it, it would be great.

If you need further details, let me know.

Thank you.

2

There are 2 answers

0
PabloLerma On BEST ANSWER

I have finally use the Reed-Solomon code: http://code.google.com/p/rscode-objc/ But thank you for your answer H2CO3 :)

0
AudioBubble On

You can try these two files for a complete CRC64 implementation (from the tags you added, I thought you'd be interested in CRC):

CRC64.h: http://pastie.org/3227564

CRC64.c: http://pastie.org/3227559