Skip to content

Instantly share code, notes, and snippets.

@davidreynolds
Created June 30, 2012 20:31
Show Gist options
  • Save davidreynolds/3025400 to your computer and use it in GitHub Desktop.
Save davidreynolds/3025400 to your computer and use it in GitHub Desktop.
void putbit1(void)
{
bit_buffer |= bit_mask;
if ((bit_mask >>= 1) == 0) {
if (fputc(bit_buffer, outfile) == EOF) error();
bit_buffer = 0; bit_mask = 128; codecount++;
}
}
void putbit0(void)
{
if ((bit_mask >>= 1) == 0) {
if (fputc(bit_buffer, outfile) == EOF) error();
bit_buffer = 0; bit_mask = 128; codecount++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment