Reference Implementation of Ruoska Encoding