boljen / snappy-go

Automatically exported from code.google.com/p/snappy-go
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Why does Encode return an error? #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The signature is:

func Encode(dst, src []byte) ([]byte, error)

The current implementation only ever returns nil for the errors.

Furthermore, how could this function ever return an error? Aren't any possible 
values of dst and src valid?

For comparison, encoding/hex has

func Encode(dst, src []byte) int
func Decode(dst, src []byte) (int, error)

Original issue reported on code.google.com by cespare@gmail.com on 1 Oct 2014 at 11:22