Transfer bits from one buffer to another, debiassing enroute. Performing a vonneumann debiassing, transfer bits from the from BitBuffer to the to BitBuffer. This method of debiassing will produce at absolute maximum, a drop of 50% in the bitcount. I.E. at minimum you will lose one bit in two. In actuality, in a truly random stream, you will lose three bits in four, which means that the debiassing will leave you with around one quarter the number of bits you started with.
Definition at line 9 of file debias.c. { BitField bits; int bits_xfered = 0; while (bitbuffer_available_bits(from) >= 2) { if (bitbuffer_extract_bits(from, &bits, 2) != 2) return bits_xfered; if ((bits & 3) == 1  (bits & 3) == 2) { if (bitbuffer_add_bits(to, bits, 1) != 1) return bits_xfered; bits_xfered++; } } return bits_xfered; }
