Modified the command line encoder and decoder to accept input from stdin and