3 ms·
There is a decoder in golang.org/x/images/webp already [0], I don't know how full-featured it is: I've never used it. The x libs are part of the Go Project but
by jimsmart 4y ago
There is a decoder in golang.org/x/images/webp already [0], I don't know how full-featured it is: I've never used it. The x libs are part of the Go Project but outside the main Go tree — and are fairly well-known to many Go developers, but clearly not all. Stuff in x sometimes makes its way into the standard library, although not always.
And there is a third-party package [1] for webp also, in native Go, which includes both a decoder and an encoder. Plus there are other third-party packages, that bind to external code (C libs, at a guess).
— If your complaint is speficially that webp support should be a part of the standard library, then perhaps keep an eye on the stuff in x, that's often where stuff happens before making it into the stdlib.
And/or file an issue.
And/or you are welcome to contribute code ;)
[0] https://pkg.go.dev/golang.org/x https://pkg.go.dev/golang.org/x
[1] https://github.com/chai2010/webp https://github.com/chai2010/webp
- al2o3cr 4y agoNitpick - chai2010/webp avoids "binding to external code" by incorporating the entire libwebp distribution in "internal/libwebp-1.0.2" and compiling it. OTOH, folks have been saying "what if we rewrote the encoder in plain Go (no C)" since 2016 and it doesn't appear to have happened: https://groups.google.com/g/golang-nuts/c/gZ-PCUGw7Rk/m/lrBFg7QaAwAJ https://groups.google.com/g/golang-nuts/c/gZ-PCUGw7Rk/m/lrBF...