MCPcopy Create free account
hub / github.com/RsyncProject/rsync / copy_block

Function copy_block

zlib/trees.c:1138–1155  ·  view source on GitHub ↗

=========================================================================== * Copy a stored block, storing first the length and its * one's complement if requested. */

Source from the content-addressed store, hash-verified

1136 * one's complement if requested.
1137 */
1138local 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}

Callers 1

_tr_stored_blockFunction · 0.85

Calls 1

bi_windupFunction · 0.85

Tested by

no test coverage detected