Closed calmh closed 7 years ago
Thanks for the awesome PR! Merged.
I did not realize that this lib was a dependency of syncthing!
You might want to pull it as
gopkg.in/chmduquesne/rollinghash.v2/adler32
instead of
github.com/chmduquesne/rollinghash/adler32
This repo respects semantic versioning, so you'll be protected against unexpected changes in the interface.
Thanks. I don't especially like gopkg.in and we use vendoring so we'll stick to the original import path as long as we are allowed to. :)
No worries, feel free to handle your dependencies how you like :-). As much as I find gopkg.in convenient, I certainly don't want to force anyone to use it.
Write() used to allocate both a full copy of the passed data and a new vanilla hasher. This removes both allocations in the common case and increases throughput by about 36% as a result. It makes this adler32.Write() comparable in performance to the vanilla hash/adler32.Write().