Fixed codec. Using bytes.Buffer instead of bufio.