icsharpcode / SharpZipLib

#ziplib is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform.
http://icsharpcode.github.io/SharpZipLib/
MIT License
3.73k stars 976 forks source link

Adding logic to the inflator and deflator streams to use pooled buffers if possible and clear memory on Dispose() #860

Open QuinnDamerell opened 7 months ago

QuinnDamerell commented 7 months ago

This change allows the inflator and deflator streams to use pooled memory buffers, so they don't need to allocate and free buffers every time they are created. The change also frees the buffers on Dispose, so the GC can clean up memory more quickly.

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.