This has been done / implemented several times but still seems like a worthwhile didactic exercise, esp. for grounding concepts and understanding of information theory more concretely (as well as optionally for learning new languages, e.g. by implementing whatever algorithm devised in Rust).