Google Interview Question

Design a encoder and decoder