An implementation of the rational approximation encoding algorithm ("Babushkin compression")