title: writing extra data into io.Writer
body: <p>I am trying to figure out how to change the behaviour of <code>jpeg.Encode</code> API (<a href="http://golang.org/pkg/image/jpeg/#Encode" rel="nofollow">http://golang.org/pkg/image/jpeg/#Encode</a>) that takes an <code>io.Writer</code> as a parameter and writes the file to it.</p>
  
  <p>I need to insert a set of bytes after the first two bytes written in to the file, and I think it is possible to do without keeping everything in memory. I am new to Golang, I found <code>io.Pipe</code> that connects a reader and a writer, but I do not understand how to use it for what I need.</p>
  
  <p>Could someone help?</p>
  
  <p>EDIT: should I just implement my own <code>io.Writer</code> interface?</p>