mreiferson/go-snappystream — pull request #10 by bmatsuo (2014-07-26 22:46:45+00:00)
Title: avoid unnecessary allocations in snappy.Encode

I just looked at the snappy-go code a bit and realized that the way Encode is used can trigger a lot of unnecessary allocations.

https://code.google.com/p/snappy-go/source/browse/snappy/encode.go#82

It was fairly trivial to optimize this.