can you write such a decoder in GO?