Right now, we have to create a new ZlibEncoder each block, but we could re-use state, and just reset the Compressor each time, which should be cheaper.
It looks like ZlibDecoder.reset() does a full overwrite with a new Decompressor, it's not clear if there's a benefit to reusing the same decoder too, but probably.
Right now, we have to create a new ZlibEncoder each block, but we could re-use state, and just reset the Compressor each time, which should be cheaper.
It looks like ZlibDecoder.reset() does a full overwrite with a new Decompressor, it's not clear if there's a benefit to reusing the same decoder too, but probably.