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.7k stars 976 forks source link

Improved signature lookup #851

Open notabene2 opened 10 months ago

notabene2 commented 10 months ago

Caching the part of the stream which potentially contains the signature improves the performance in case of streams where seeking backwards is costly. If the underlying stream is for example an Azure blob stream which pretends to contain a zip file but actually does not then the lookup took several minutes to figure this out.

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.