IssueRaiser

compress/zstd: add new package

Zstandard ([RFC 8878](https://datatracker.ietf.org/doc/html/rfc8878)) is well-positioned to replaced GZIP ([RFC 1952](https://datatracker.ietf.org/doc/html/rfc1952)) as the de-facto compression format. Zstandard: * is [faster to compress/decompress](https://facebook.github.io/zstd/#benchmarks) than GZIP, * has [much better compression ratios](https://github.com/golang/go/issues/62446#issue-1880889127), * is [well-specified](https://datatracker.ietf.org/doc/html/rfc8878), * is [backed by a prominent company](https://github.com/facebook/zstd), and * is seeing increased adoption in use with archives and as a [browser content encoding](https://chromestatus.com/feature/6186023867908096). Given the likely ubiquitous place Zstandard is going have in the future, I propose first-class adoption of Zstandard in the stdlib. Existing Go implementations: * @klauspost has an excellent Zstandard implementation at [github.com/klauspost/compress/zstd](https://pkg.go.dev/github.com/klauspost/compress/zstd), but the API is a somewhat complex and it makes use of native assembly. * @ianlancetaylor implemented a Zstandard decompressor in [internal/zstd](https://github.com/golang/go/tree/master/src/internal/zstd) without any use of `unsafe` or assembly. Some goals for this package: * The API be simple and similar to existing packages like `compress/gzip`. * It does not use `unsafe` or assembly similar to the existing compress package. * Performance is always nice, but Go community surveys c

Posted by dsnet on Sep 7, 2023, 7:53 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

compress/zstd: add new package

dsnetSep 7, 2023, 7:53 PM

Zstandard ([RFC 8878](https://datatracker.ietf.org/doc/html/rfc8878)) is well-positioned to replaced GZIP ([RFC 1952](https://datatracker.ietf.org/doc/html/rfc1952)) as the de-facto compression format. Zstandard: * is [faster to compress/decompress](https://facebook.github.io/zstd/#benchmarks) than GZIP, * has [much better compression ratios](https://github.com/golang/go/issues/62446#issue-1880889127), * is [well-specified](https://datatracker.ietf.org/doc/html/rfc8878), * is [backed by a prominent company](https://github.com/facebook/zstd), and * is seeing increased adoption in use with archives and as a [browser content encoding](https://chromestatus.com/feature/6186023867908096). Given the likely ubiquitous place Zstandard is going have in the future, I propose first-class adoption of Zstandard in the stdlib. Existing Go implementations: * @klauspost has an excellent Zstandard implementation at [github.com/klauspost/compress/zstd](https://pkg.go.dev/github.com/klauspost/compress/zstd), but the API is a somewhat complex and it makes use of native assembly. * @ianlancetaylor implemented a Zstandard decompressor in [internal/zstd](https://github.com/golang/go/tree/master/src/internal/zstd) without any use of `unsafe` or assembly. Some goals for this package: * The API be simple and similar to existing packages like `compress/gzip`. * It does not use `unsafe` or assembly similar to the existing compress package. * Performance is always nice, but Go community surveys c

Comments (0)

No comments yet. Start the discussion.

Comment on this issue