chore: add crc32c combine utility - #1376
Conversation
BenWhitehead
left a comment
There was a problem hiding this comment.
A few minor things to clean up, after that it should be ready to merge.
Additionally, can you retarget this PR to feat/grpc-storage instead of main?
| /* | ||
| There is a more efficient implementation in https://github.com/google/crc32c, however for brevity we are following | ||
| the byte by byte computation, implemented in: https://github.com/google/crc32c/blob/main/src/crc32c_portable.cc#L252-L257 | ||
| */ |
There was a problem hiding this comment.
Lets replace this with an actual javadoc comment for the method.
/**
* Straight forward implementation to concatenate ...
* @param crc1
* @param crc2
* @param crc2ObjectSize
* @return
* @see <a target="_blank" rel="noopener noreferrer" href="https://github.com/google/crc32c/blob/main/src/crc32c_portable.cc#L252-L257">https://github.com/google/crc32c/blob/main/src/crc32c_portable.cc#L252-L257</a>
*/
We can also link to the actual code from the javadoc comment and it will be turned into a clickable link rather than simply text.
| /* | ||
| Implementation borrowed taken from: https://github.com/google/crc32c/blob/main/src/crc32c_portable.cc#L16-L59 | ||
| */ |
There was a problem hiding this comment.
Can we javadoc this comment similar to the method?
Also, for all links to github we should link to the SHA of the code rather than main so the link is stable and the line numbers are known.
There was a problem hiding this comment.
Also probably some phrasing like "Ported from ..." instead of "borrowed/taken"
…c32cUtility.java Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
BenWhitehead
left a comment
There was a problem hiding this comment.
Thanks for the cleanup!
Two more recommendations for git links. After that feel free to merge.
…c32cUtility.java Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
…c32cUtility.java Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: