Skip to content

Commit

Permalink
Fix bug where double syncs not inserted when using -i -p 1.
Browse files Browse the repository at this point in the history
Decompression can be started at an independent block, requested
with -i or --independent, where such blocks are marked in the
output with double sync markers. This fixes a bug where only
single markers were emitted when a single processor (-p 1) was
used in combination with independent blocks.
  • Loading branch information
madler committed Dec 24, 2019
1 parent c3de75b commit 501a955
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pigz.c
Expand Up @@ -2399,10 +2399,9 @@ local void single_compress(int reset) {
}
}
else
#else
{
DEFLATE_WRITE(Z_SYNC_FLUSH);
}
#else
DEFLATE_WRITE(Z_SYNC_FLUSH);
#endif
if (!g.setdict) // two markers when independent
DEFLATE_WRITE(Z_FULL_FLUSH);
Expand Down

0 comments on commit 501a955

Please sign in to comment.