OctopusDeploy / Octodiff

| Public | 100% C# implementation of remote delta compression based on the rsync algorithm
Other
24 stars 87 forks source link

Changed SupportedAlgorithms class to Registry Design Pattern. #21

Closed arabasso closed 4 years ago

arabasso commented 5 years ago

Hello!

I am sending this modification to provide the possibility to alter the hashing and checksum algorithms of Octodiff (this will allow to use mainly more performative hashing algorithms).

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

droyad commented 4 years ago

@arabasso Sorry, this slipped under the radar as the CLA was not signed. This looks good to me and I'm happy to merge it once the CLA is signed.

I couldn't think of a good way to keep this backwards compatible, so we'll need to bump the major

arabasso commented 4 years ago

Hello! Sorry, just now I became aware of this CLA... Anyway, about the modification, I made it so that the code was fully backwards compatible.

droyad commented 4 years ago

@arabasso Thanks. It's compile time compatible, but I'm not sure it's runtime compatible. I might just check on that.

droyad commented 4 years ago

Yeh I get a System.TypeLoadException: Could not load type 'Checksum' from assembly 'Octodiff when I drop the the updated DLL into it. Only a problem if it on the crazy chance someone is calling those methods from outside.

arabasso commented 4 years ago

Yes, it is not runtime compatible because additional classes and interfaces have been created. Anyone who wants to use this version of the library will have to recompile the project that uses it.

arabasso commented 4 years ago

Also, it would be interesting to use the xxHash algorithm instead of SHA1 (SHA1 has an average speed of 0.28 GB/s, while xxHash has 5.4 GB/s).

https://cyan4973.github.io/xxHash/