up pir encode