On Wed, 29 Jul 2009 08:51:00 -0700 (PDT), RVic <>
wrote, quoted or indirectly quoted someone who said :
>If I have an inputstream, as a byte[], and I know that the stream is
>7E1 (7 bits with 1 parity bit, even parity) how do I break apart each
>byte in the byte array into the constituent 7 bits (as the ASCII code
>or integer representation) and the parity bit? Surely there must be
>some very efficient means for doing this? Thanks,
Shift, mask and test in a loop.
see
http://mindprod.com/jgloss/parity.html
for sample code.
--
Roedy Green Canadian Mind Products
http://mindprod.com
The USA and Iraq are as mismatched combatants as Mike Tyson and a bag lady. Americans make themselves look ridiculous when they justify invading and occupying Iraq in self defence.