equal
deleted
inserted
replaced
4854 hash |
4854 hash |
4855 |sz| |
4855 |sz| |
4856 |
4856 |
4857 sz := self size. |
4857 sz := self size. |
4858 sz <= 32 ifTrue:[ |
4858 sz <= 32 ifTrue:[ |
4859 ^ self computeXorHashFrom:1 to:sz. |
4859 ^ self computeXorHashFrom:1 to:sz. |
4860 ]. |
4860 ]. |
|
4861 |
|
4862 "/ the code below is actually not doing what was intended (to take the hashes of the first 16 |
|
4863 "/ and the last 16 bytes. |
|
4864 "/ It does actually take the last 17 bytes (due to a mistake of the original programmer...) |
|
4865 "/ However, we will not change it, but keep it that way, in case the hashvalue already found |
|
4866 "/ its way into some dictionary (as key-index). |
|
4867 "/ It does not really hurt anyway, so there is no need to change it. |
4861 ^ (sz bitXor:(self computeXorHashFrom:1 to:16)) bitXor:(self computeXorHashFrom:sz-16 to:sz) |
4868 ^ (sz bitXor:(self computeXorHashFrom:1 to:16)) bitXor:(self computeXorHashFrom:sz-16 to:sz) |
4862 |
4869 |
4863 " |
4870 " |
4864 #[1 2 3 4] hash |
4871 #[1 2 3 4] hash |
4865 #[1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 |
4872 #[1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 ] hash |
4866 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 ] hash |
4873 |
4867 #[1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 |
4874 #[1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 |
4868 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1] hash |
4875 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 ] hash |
4869 " |
4876 |
|
4877 #[1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 |
|
4878 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1] hash |
|
4879 " |
|
4880 |
|
4881 "Modified (format): / 28-11-2017 / 15:03:36 / cg" |
4870 ! ! |
4882 ! ! |
4871 |
4883 |
4872 !UninterpretedBytes methodsFor:'image manipulation support'! |
4884 !UninterpretedBytes methodsFor:'image manipulation support'! |
4873 |
4885 |
4874 copyReverse |
4886 copyReverse |