script: strict encode/decode op1 - op16

fix #33