The Base256Encoder does not produce the correct headerlength for binary data sometimes.
This happens, if the number of bytes to be encoded are more than 249 bytes and additionally the number of bytes to be written equals symbol capacity.
In my case I tried to encode exactly 278 bytes of binary data and my barcode scanner was not able to decode the barcode correctly.
If I delete the following condition ("if (context.hasMoreCharacters() || mustPad) ") within the encode-method of Base256Encoder everything works fine.
Log in to post a comment.