murmur3 1.0.4 → 1.0.5
raw patch · 3 files changed
+69/−51 lines, 3 filesdep +base16dep −base16-bytestringdep ~HUnitdep ~QuickCheckdep ~bytestring
Dependencies added: base16
Dependencies removed: base16-bytestring
Dependency ranges changed: HUnit, QuickCheck, bytestring, test-framework, test-framework-hunit, test-framework-quickcheck2
Files
- README.md +16/−0
- murmur3.cabal +50/−48
- tests/Data/Hash/Murmur/Units.hs +3/−3
+ README.md view
@@ -0,0 +1,16 @@+[](https://travis-ci.org/haskoin/murmur3)++# Murmur3++Pure Haskell implementation of the MurmurHash3 algorithm.++## Documentation++http://hackage.haskell.org/package/murmur3++For details on the MurmurHash3 algorithm, see+http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp++## Contributing++Contribute via GitHub pull requests.
murmur3.cabal view
@@ -1,54 +1,56 @@-name: murmur3-version: 1.0.4-synopsis: - Pure Haskell implementation of the MurmurHash3 x86_32 algorithm.-description:- MurmurHash3 is a non-cryptogrpahic hash function suitable for general- hash-based lookup. We provide the x86_32 version which closely follows - the following implementation:- <https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp>-homepage: http://github.com/plaprade/murmur3-bug-reports: http://github.com/plaprade/murmur3/issues-stability: stable-license: MIT-license-file: LICENSE-author: Philippe Laprade-maintainer: plaprade+hackage@gmail.com-category: Data, Hash, Murmur-build-type: Simple-cabal-version: >= 1.10+cabal-version: 1.12 -source-repository head- type: git- location: git://github.com/haskoin/murmur3.git+-- This file has been generated from package.yaml by hpack version 0.34.4.+--+-- see: https://github.com/sol/hpack -library- default-language: Haskell98- exposed-modules: Data.Hash.Murmur+name: murmur3+version: 1.0.5+synopsis: Pure Haskell implementation of the MurmurHash3 x86 algorithm+description: MurmurHash3 is a non-cryptographic hash function suitable for general hash-based lookup. We provide the x86 version which closely follows the following implementation: <https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp>+category: Data, Hash, Murmur+stability: stable+homepage: https://github.com/haskoin/murmur3#readme+bug-reports: https://github.com/haskoin/murmur3/issues+maintainer: Jean-Pierre Rupp+license: MIT+license-file: LICENSE+build-type: Simple+extra-source-files:+ README.md - build-depends: base >= 4.6 && < 5 - , bytestring >= 0.10 - , cereal >= 0.5.1 +source-repository head+ type: git+ location: https://github.com/haskoin/murmur3 - ghc-options: -Wall+library+ exposed-modules:+ Data.Hash.Murmur+ other-modules:+ Paths_murmur3+ build-depends:+ base >=4.6 && <5+ , bytestring >=0.10+ , cereal >=0.5.1+ default-language: Haskell2010 test-suite test-murmur3- default-language: Haskell98- type: exitcode-stdio-1.0- main-is: Main.hs-- other-modules: Data.Hash.Murmur.Units-- build-depends: base >= 4.6 && < 5 - , base16-bytestring >= 0.1- , bytestring >= 0.10- , murmur3- , HUnit >= 1.2- , QuickCheck >= 2.6- , test-framework >= 0.8- , test-framework-quickcheck2 >= 0.3- , test-framework-hunit >= 0.3-- ghc-options: -Wall - hs-source-dirs: tests-+ type: exitcode-stdio-1.0+ main-is: Main.hs+ other-modules:+ Data.Hash.Murmur.Units+ Paths_murmur3+ hs-source-dirs:+ tests+ build-depends:+ HUnit+ , QuickCheck+ , base >=4.6 && <5+ , base16+ , bytestring+ , cereal >=0.5.1+ , murmur3+ , test-framework+ , test-framework-hunit+ , test-framework-quickcheck2+ default-language: Haskell2010
tests/Data/Hash/Murmur/Units.hs view
@@ -5,7 +5,7 @@ import Test.Framework.Providers.HUnit (testCase) import Data.Word (Word32)-import qualified Data.ByteString.Base16 as B16 (decode)+import qualified Data.ByteString.Base16 as B16 (decodeBase16Lenient) import qualified Data.ByteString.Char8 as C (pack) import Data.Hash.Murmur (murmur3)@@ -14,7 +14,7 @@ tests :: [Test] tests =- [ testGroup "MurmurHash3" + [ testGroup "MurmurHash3" (map buildTest $ zip testVectors [0..]) ] @@ -26,7 +26,7 @@ assertTestVector (expected, seed, str) = assertBool " > MurmurHash3 " $ result == expected where- result = murmur3 seed (fst $ B16.decode $ C.pack str)+ result = murmur3 seed (B16.decodeBase16Lenient $ C.pack str) testVectors :: [TestVector] testVectors =