Encoding binary

Skip to first unread message

Charlie Chan

Aug 22, 2016, 9:56:41 PM8/22/16
to zxing

First of all, thank you for this wonderful piece of software.

I'd like to use Reed Solomon Code for coding pure binary representation, so that:
Number of bits per symbol m = 1 (if not possible with m=1, then what is the lowest m possible?)

I want to encode k=31 message symbols, plus 32 parity symbols.
I think I have to create a custom GF for this.
GenericGF myBinaryGF = new GenericGF(primitive, size, b);

I spent a long time but still couldn't figure out how to set the parameters. My guess is:
size = 2^m = 2
b = 1
primitive = ???
but have tried different primitive with no success. Can you help please?



Sean Owen

Aug 28, 2016, 8:19:35 AM8/28/16
to zxing
I don't think it will be possible to use 1-bit codewords with R-S. I believe 2 bits would work, but in general you'd almost always choose 8 bits = 1 byte for convenience. Yes, size = 2^m. b is always 1 except for QR codes; it's a complex detail of how it's defined. 

If you just want to encode binary data, there's no reason you need 1-bit codewords. Bytes are fine for example.
Reply all
Reply to author
0 new messages