You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
I was looking through the rabin usage and I think I found a bug. I commented more thoroughly in the commit introducing it 542b3e4#r34327138
At least one of 2 things are a bug, depending on how getFingerprints works.
If getFingerprints always goes through the end of each chunk it is handed, then there’s an unnecessary copy in Buffer.concat(pending) because pending is cleared on every iteration. This would also mean that the chunking from the stream impacts the fingerprinting and we may want the option of buffering all the data to fingerprint at once.
If getFingerprints does not always give you fingerprints through the end of the chunk then this code is dropping tail data when it fingerprints and then sliceing the wrong data out of the bl instance it’s using to keep prior tail data.
The text was updated successfully, but these errors were encountered:
mikeal
changed the title
bug: incorrect rabin chunking of tail data
bug: unnecessary memcopies in rabin chunker
Jul 17, 2019
I was looking through the rabin usage and I think I found a bug. I commented more thoroughly in the commit introducing it 542b3e4#r34327138
At least one of 2 things are a bug, depending on how
getFingerprints
works.getFingerprints
always goes through the end of each chunk it is handed, then there’s an unnecessary copy inBuffer.concat(pending)
because pending is cleared on every iteration. This would also mean that the chunking from the stream impacts the fingerprinting and we may want the option of buffering all the data to fingerprint at once.IfgetFingerprints
does not always give you fingerprints through the end of the chunk then this code is dropping tail data when it fingerprints and then sliceing the wrong data out of thebl
instance it’s using to keep prior tail data.The text was updated successfully, but these errors were encountered: