improve robustness of decoding. add README and COPYRIGHT