VictoriaMetrics/vendor/github.com/valyala/gozstd
2019-12-26 19:31:07 +02:00
..
.gitignore all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
.travis.yml vendor: update github.com/valyala/gozstd from v1.6.1 to v1.6.2 2019-09-16 21:50:02 +03:00
dict.go vendor: update github.com/valyala/gozstd from v1.5.1 to v1.6.0 2019-08-15 12:57:59 +03:00
doc.go vendor: update github.com/valyala/gozstd to v1.5.1 2019-06-22 00:14:11 +03:00
go.mod vendor: update github.com/valyala/gozstd from v1.5.1 to v1.6.0 2019-08-15 12:57:59 +03:00
gozstd.go vendor: update github.com/valyala/gozstd from v1.6.3 to v1.6.4 2019-12-26 19:31:07 +02:00
libzstd_darwin_amd64.a vendor: updated github.com/valyala/gozstd from v1.6.2 to v1.6.3 2019-11-21 23:56:27 +02:00
libzstd_darwin_amd64.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
libzstd_freebsd_amd64.a all: port to FreeBSD on GOARCH=amd64 2019-08-28 01:46:09 +03:00
libzstd_freebsd_amd64.go all: port to FreeBSD on GOARCH=amd64 2019-08-28 01:46:09 +03:00
libzstd_linux_amd64.a vendor: updated github.com/valyala/gozstd from v1.6.2 to v1.6.3 2019-11-21 23:56:27 +02:00
libzstd_linux_amd64.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
libzstd_linux_arm64.a vendor: update github.com/valyala/gozstd from v1.6.1 to v1.6.2 2019-09-16 21:50:02 +03:00
libzstd_linux_arm64.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
libzstd_linux_arm.a vendor: update github.com/valyala/gozstd from v1.6.1 to v1.6.2 2019-09-16 21:50:02 +03:00
libzstd_linux_arm.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
libzstd_windows_amd64.a vendor: updated github.com/valyala/gozstd from v1.6.2 to v1.6.3 2019-11-21 23:56:27 +02:00
libzstd_windows_amd64.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
LICENSE all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
Makefile all: port to FreeBSD on GOARCH=amd64 2019-08-28 01:46:09 +03:00
reader.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
README.md vendor: update github.com/valyala/gozstd from v1.6.1 to v1.6.2 2019-09-16 21:50:02 +03:00
stream.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
writer.go vendor: update github.com/valyala/gozstd from v1.5.1 to v1.6.0 2019-08-15 12:57:59 +03:00
zdict.h vendor: update github.com/valyala/gozstd from v1.5.1 to v1.6.0 2019-08-15 12:57:59 +03:00
zstd_errors.h all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
zstd.h vendor: updated github.com/valyala/gozstd from v1.6.2 to v1.6.3 2019-11-21 23:56:27 +02:00

Build Status GoDoc Go Report codecov

gozstd - go wrapper for zstd

Features

  • Vendors upstream zstd without any modifications.

  • Simple API.

  • Optimized for speed. The API may be easily used in zero allocations mode.

  • Compress* and Decompress* functions are optimized for high concurrency.

  • Proper Writer.Flush for network apps.

  • Supports the following features from upstream zstd:

    • Block / stream compression / decompression with all the supported compression levels and with dictionary support.
    • Dictionary building from a sample set. The created dictionary may be saved to persistent storage / transfered over the network.
    • Dictionary loading for compression / decompression.

    Pull requests for missing upstream zstd features are welcome.

Quick start

How to install gozstd?

go get -u github.com/valyala/gozstd

How to compress data?

The easiest way is just to use Compress:

	compressedData := Compress(nil, data)

There is also StreamCompress and Writer for stream compression.

How to decompress data?

The easiest way is just to use Decompress:

	data, err := Decompress(nil, compressedData)

There is also StreamDecompress and Reader for stream decompression.

Who uses gozstd?

FAQ

  • Q: Which go version is supported?
    A: go1.10 and newer. Pull requests for older go versions are accepted.

  • Q: Which platforms/architectures are supported?
    A: linux/amd64, linux/arm, linux/arm64, freebsd/amd64, darwin/amd64, windows/amd64. Pull requests for other platforms/architectures are accepted.

  • Q: I don't trust libzstd*.a binary files from the repo or these files dont't work on my OS/ARCH. How to rebuild them? A: Just run make clean libzstd.a if your OS/ARCH is supported.

  • Q: How do I specify custom build flags when recompiling libzstd*.a? A: You can specify MOREFLAGS=... variable when running make like this: MOREFLAGS=-fPIC make clean libzstd.a.

  • Q: Why the repo contains libzstd*.a binary files?
    A: This simplifies package installation to usual go get without additional steps for building the libzstd*.a