On Dec 2, 2013, at 7:57 AM, Marcel Weiher <marcel.wei...@gmail.com> wrote:

> Then you can twiddle the hash to get you a good compromise of speed vs. 
> collisions.

You want to optimize the hash further? Only hash the first 1MB. Except for odd 
cases, like two multi-image TIFFs sharing the exact same first n images (maybe 
the second one was created by appending to the first), that will still very 
rarely yield collisions--then compare collisions for identity.

One note: we're all saying that identity checks will be rare, so the amortized 
cost is very low. Well. That's true if the user is actually adding different 
files. The amortized cost is not so low if you have users who keep adding the 
same files over & over ;-)

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to