How To Install triehash on Fedora 36

In this tutorial we learn how to install triehash in Fedora 36. triehash is Generator for order-preserving minimal perfect hash functions in C

Introduction

In this tutorial we learn how to install triehash on Fedora 36.

What is triehash

TrieHash generates perfect hash functions as C code which then gets compiled into optimal machine code as part of the usual program compilation. TrieHash works by translating a list of strings to a trie, and then converting the trie to a set of recursive switch statements; first switching by length, and then switching by bytes. TrieHash has various optimizations such as processing multiple bytes at once (on GNU C), and shortcuts for reducing the complexity of case-insensitive matching (ASCII only). Generated code performs substantially faster than gperf, but is larger. TrieHash was written for use in APT.

We can use yum or dnf to install triehash on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install triehash.

Install triehash on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install triehash using dnf by running the following command:

sudo dnf -y install triehash

Install triehash on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install triehash using yum by running the following command:

sudo yum -y install triehash

How To Uninstall triehash on Fedora 36

To uninstall only the triehash package we can use the following command:

sudo dnf remove triehash

triehash Package Contents on Fedora 36

/usr/bin/triehash
/usr/share/doc/triehash
/usr/share/doc/triehash/README.md
/usr/share/licenses/triehash
/usr/share/licenses/triehash/LICENSE.md
/usr/share/man/man1/triehash.1.gz

References

Summary

In this tutorial we learn how to install triehash on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).