CMPH(1)

✨ CMPH(1) ✨

okay bestie, gather round, because today we're learning about cmph, the minimum perfect hashing tool πŸ’– (that's the manual name btw, CMPH(1), section 1, we love her)


🌸 NAME 🌸

cmph β€” minimum perfect hashing tool πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

cmph [-v] [-h] [-V] [-k nkeys] [-f hash_function] [-g [-c value][-s
seed] ] [-a algorithm] [-M memory_in_MB] [-b BRZ_parameter] [-d tmp_dir]
[-m file.mph] keysfile

πŸ’… DESCRIPTION πŸ’…

It's a command line tool that generates and queries minimal perfect hash functions. That's the whole vibe. πŸ¦‹

For the full documentation, please refer to http://cmph.sf.net β€” the source site, no cap. ✨

  • -h β€” Print an help message πŸ™ˆ
  • -c β€” This value determines: the number of vertices in the graph for the algorithms BMZ and CHM; the number of bits per key required in the FCH algorithm
  • -a β€” Algorithm. Valid values are: bmz, bmz8, chm, brz, fch
  • -f β€” hash function (may be used multiple times). valid values are: djb2, fnv, jenkins, sdbm
  • -V β€” Print version number and exit
  • -v β€” Increase verbosity (may be used multiple times)
  • -k β€” Number of keys
  • -g β€” Generation mode
  • -s β€” Random seed
  • -m β€” Minimum perfect hash function file
  • -M β€” Main memory availability (in MB)
  • -d β€” Temporary directory used in brz algorithm
  • -b β€” Parameter of BRZ algorithm to make the maximal number of keys in a bucket lower than 256
  • keysfile β€” Line separated file with keys πŸ“

🌈 EXAMPLE 🌈

$ # Using the default algorithm (chm) for constructing a mphf
$ # for keys in file keys_file. Lines in keys_file _must_ be unique.
$ ./cmph -v -g keys_file
$ # Query id of keys in the file keys_query
$ ./cmph -v -m keys_file.mph keys_query
bestie the lines in keys_file MUST be unique, that's not a suggestion, that's the law 😭

πŸ’œ AUTHOR πŸ’œ

This manual page was written by Enrico Tassi <gareuselesinge@users.sourceforge.net>, for the Debian project (but may be used by others). 🫢


okay that's the whole thing, go forth and hash perfectly πŸ’–βœ¨ this was cmph version 0.6, dated October 2007, and honestly? iconic. periodt. πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from