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