=========================================================================== * Copy a stored block, storing first the length and its * one's complement if requested. */
| 1136 | * one's complement if requested. |
| 1137 | */ |
| 1138 | local void copy_block(deflate_state *s, charf *buf, unsigned len, int header) |
| 1139 | { |
| 1140 | bi_windup(s); /* align on byte boundary */ |
| 1141 | |
| 1142 | if (header) { |
| 1143 | put_short(s, (ush)len); |
| 1144 | put_short(s, (ush)~len); |
| 1145 | #ifdef DEBUG |
| 1146 | s->bits_sent += 2*16; |
| 1147 | #endif |
| 1148 | } |
| 1149 | #ifdef DEBUG |
| 1150 | s->bits_sent += (ulg)len<<3; |
| 1151 | #endif |
| 1152 | while (len--) { |
| 1153 | put_byte(s, *buf++); |
| 1154 | } |
| 1155 | } |
no test coverage detected