⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bit_input.c

📁 算术码编码代码源程序
💻 C
字号:
/* BIT INPUT ROUTINES. */#include <stdio.h>/* THE BIT BUFFER. */static int buffer;		/* Bits waiting to be input                 */static int bits_to_go;		/* Number of bits still in buffer           *//* INITIALIZE BIT INPUT. */start_inputing_bits(){   bits_to_go = 0;				/* Buffer starts out with   */}						/* no bits in it.           *//* INPUT A BIT. */int input_bit(){   int t;    bits_to_go -= 1;    if (bits_to_go<0) {				/* Read the next byte if no */        buffer = getc(stdin);			/* bits are left in the     */        bits_to_go = 7;				/* buffer. Return anything  */    }			   			/* after end-of-file.       */    t = buffer&1;    buffer >>= 1;				/* Return the next bit from */    return t;					/* the bottom of the byte.  */}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -