Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bgzf.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ int bgzf_close(BGZF* fp)
if (fp->open_mode == 'w') {
if (bgzf_flush(fp) != 0) return -1;
{ // add an empty block
// add 28 bytes EOF empty block
fp->compress_level=Z_DEFAULT_COMPRESSION; //don't need value again
// (different compression levels would give different empty blocks)
int count, block_length = deflate_block(fp, 0);
#ifdef _USE_KNETFILE
count = fwrite(fp->compressed_block, 1, block_length, fp->x.fpw);
Expand Down