The Huffman code is the typical classic among compression codes, as this is an algorithm for lossless data compression. The C# code has a simple structure and fulfills the very fast derivation of the Huffman code, as well as the decoding. It's worth taking a look.
https://github.com/michelenatale/Compress/tree/main/HuffmanCoding
Exponential-Golomb-Codes (also known as Exp-Golomb-Coding) represent integers with bit patterns that become longer for larger numbers. One would think. The exponential Golomb code created here performs an analysis beforehand and adjusts the length of the code to the frequency.
https://github.com/michelenatale/Compress/tree/main/ExponentialGolombCode