Dr-Emann / applesauce

Transparent compression for Apple File System Compression (AFSC)
GNU General Public License v3.0
20 stars 0 forks source link

Allow actually re-using flate2 compressor state #7

Open Dr-Emann opened 1 year ago

Dr-Emann commented 1 year ago

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.