| 183 | } |
| 184 | |
| 185 | static void PKWAREAPI FlushBuf(TCmpStruct * pWork) |
| 186 | { |
| 187 | unsigned char save_ch1; |
| 188 | unsigned char save_ch2; |
| 189 | unsigned int size = 0x800; |
| 190 | |
| 191 | pWork->write_buf(pWork->out_buff, &size, pWork->param); |
| 192 | |
| 193 | save_ch1 = pWork->out_buff[0x800]; |
| 194 | save_ch2 = pWork->out_buff[pWork->out_bytes]; |
| 195 | pWork->out_bytes -= 0x800; |
| 196 | |
| 197 | memset(pWork->out_buff, 0, sizeof(pWork->out_buff)); |
| 198 | |
| 199 | if(pWork->out_bytes != 0) |
| 200 | pWork->out_buff[0] = save_ch1; |
| 201 | if(pWork->out_bits != 0) |
| 202 | pWork->out_buff[pWork->out_bytes] = save_ch2; |
| 203 | } |
| 204 | |
| 205 | static void PKWAREAPI OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit_buff) |
| 206 | { |