Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Implementation of static hash map data structure.
Documentation
A static perfect hash table where the keys are byte arrays. This table cannot be updated after its creation, but all lookups have guaranteed O(1) worst-case cost. It consumes linear space. This is an excellent candidate for use with compact regions.
fromTrustedList :: [(Bytes, Word)] -> Map Source #
Build a map from keys that are known at compile time. All keys must be 64 bytes or less. This uses a built-in source of entropy and is entirely deterministic. An adversarial user could feed this function keys that cause it to error out rather than completing.
Used for testing
distinctEntropies :: Map -> Int Source #
The number of non-matching entropies being used.