Branch Coverage

deps/libgit2/src/util/zstream.c
Criterion Covered Total %
branch 36 50 72.0


line true false branch
28 0 0 if (zs->z.msg)
41 1178 14 if (zstream->type == GIT_ZSTREAM_INFLATE)
50 1178 14 if (zstream->type == GIT_ZSTREAM_INFLATE)
58 0 50 if (zstream->type == GIT_ZSTREAM_INFLATE)
77 821 55 return (!zstream->in_len && zstream->zerr == Z_STREAM_END);
814 7 return (!zstream->in_len && zstream->zerr == Z_STREAM_END);
87 0 12 if (zstream->in_len > ZSTREAM_BUFFER_SIZE)
89 3 9 else if (zstream->in_len > ZSTREAM_BUFFER_MIN_EXTRA)
104 0 1686 if (zstream->in_len > UINT_MAX) {
117 0 1686 if ((size_t)zstream->z.avail_out != *out_len)
122 1624 62 if (zstream->type == GIT_ZSTREAM_INFLATE)
127 0 1686 if (zstream_seterr(zstream))
143 1258 318 if (zstream->in_len && zstream->zerr == Z_STREAM_END) {
0 1258 if (zstream->in_len && zstream->zerr == Z_STREAM_END) {
148 1629 1212 while (out_remain > 0 && zstream->zerr != Z_STREAM_END) {
1265 364 while (out_remain > 0 && zstream->zerr != Z_STREAM_END) {
151 0 1265 if (git_zstream_get_output_chunk(out, &out_written, zstream) < 0)
159 1130 446 GIT_ASSERT(zstream->in_len > 0 || zstream->flush == Z_FINISH);
0 1130 GIT_ASSERT(zstream->in_len > 0 || zstream->flush == Z_FINISH);
172 0 7 if ((error = git_zstream_init(&zs, type)) < 0)
175 0 7 if ((error = git_zstream_set_input(&zs, in, in_len)) < 0)
178 12 7 while (!git_zstream_done(&zs)) {
181 0 12 if ((error = git_str_grow_by(out, step)) < 0)
186 0 12 if ((error = git_zstream_get_output(
194 3 4 if (out->size < out->asize)