Logo Search packages:      
Sourcecode: c2n version File versions  Download package

static void encodeByte ( unsigned char  c  )  [static]

Encode a byte marker and a byte

Parameters:
c the byte to be encoded

Definition at line 81 of file encode.c.

References encodeBit(), and encodeMarker().

Referenced by encBlock(), encode264Block(), encode_oric(), and encodeBlock().

{
  register unsigned i, parity;

  encodeMarker ();

  for (parity = 1, i = 8; i--; c >>= 1) {
    encodeBit (c & 1);
    if (c & 1)
      parity = !parity;
  }

  encodeBit (parity);
}


Generated by  Doxygen 1.6.0   Back to index