zlib: emit after properly closed