=========================================================================== * Copy a stored block, storing first the length and its * one's complement if requested. */
(s, buf, len, header)
| 1195 | * one's complement if requested. |
| 1196 | */ |
| 1197 | local void copy_block(s, buf, len, header) |
| 1198 | deflate_state *s; |
| 1199 | charf *buf; /* the input data */ |
| 1200 | unsigned len; /* its length */ |
| 1201 | int header; /* true if block header must be written */ |
| 1202 | { |
| 1203 | bi_windup(s); /* align on byte boundary */ |
| 1204 | s->last_eob_len = 8; /* enough lookahead for inflate */ |
| 1205 | |
| 1206 | if (header) { |
| 1207 | put_short(s, (ush)len); |
| 1208 | put_short(s, (ush)~len); |
| 1209 | #ifdef DEBUG |
| 1210 | s->bits_sent += 2*16; |
| 1211 | #endif |
| 1212 | } |
| 1213 | #ifdef DEBUG |
| 1214 | s->bits_sent += (ulg)len<<3; |
| 1215 | #endif |
| 1216 | while (len--) { |
| 1217 | put_byte(s, *buf++); |
| 1218 | } |
| 1219 | } |
no test coverage detected