we could set an int *error member that's passed in by the user, so they could check that the decode succeeded