add script for encoding/decoding printer codes