GRP encoding/decoding library