Encoding and decoding

  What is the difference between encoding and decoding? What is distortion?