On Thu, Jun 13, 2013 at 1:29 PM, Maarten Koopmans
<
maarten....@gmail.com> wrote:
> See &subject.  I have an http upload that I want to pass through a
> compression stage and then encrypt.
>
> I can compress or encrypt using io.Copy - I seem to miss how to pipe a
> writer in e.g. the gzip package to the reader of an encryption stream.
It's just a matter of stacking the writers. This is a simple tweak of
the example on crypto/cipher, for instance:
    
http://play.golang.org/p/4CX1J_IYqk
> I considered implementing my own buffering stream with goroutines, but I
> suspect this is one of the things that may be supported from the default
> libs - once you know "how".
Although it's really not necessary for this case, this already exists:
    
http://blog.labix.org/2013/04/15/unix-like-pipelines-for-go
gustavo @ 
http://niemeyer.net