diff --git a/go.mod b/go.mod index a335df424..c1950e7ca 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/go-cmp v0.3.0 // indirect github.com/klauspost/compress v1.8.3 github.com/valyala/fastjson v1.4.1 - github.com/valyala/gozstd v1.6.1 + github.com/valyala/gozstd v1.6.2 github.com/valyala/histogram v1.0.1 github.com/valyala/quicktemplate v1.2.0 golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 diff --git a/go.sum b/go.sum index 5bd9a521b..bc0ca267b 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/y github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI= github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= -github.com/valyala/gozstd v1.6.1 h1:oFN2mNW0kOr1fEKJuLpDwakNb6Y9fElVEBZmPEsFTUw= -github.com/valyala/gozstd v1.6.1/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= +github.com/valyala/gozstd v1.6.2 h1:MgBfNm0I8IKm51LUTTKfO9vi4BtmoH7kBXeUvgaiZVU= +github.com/valyala/gozstd v1.6.2/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= github.com/valyala/histogram v1.0.1 h1:FzA7n2Tz/wKRMejgu3PV1vw3htAklTjjuoI6z3d4KDg= github.com/valyala/histogram v1.0.1/go.mod h1:lQy0xA4wUz2+IUnf97SivorsJIp8FxsnRd6x25q7Mto= github.com/valyala/quicktemplate v1.2.0 h1:BaO1nHTkspYzmAjPXj0QiDJxai96tlcZyKcI9dyEGvM= diff --git a/vendor/github.com/valyala/gozstd/.travis.yml b/vendor/github.com/valyala/gozstd/.travis.yml index 648354edc..a7419f6b9 100644 --- a/vendor/github.com/valyala/gozstd/.travis.yml +++ b/vendor/github.com/valyala/gozstd/.travis.yml @@ -3,9 +3,10 @@ language: go os: - linux - osx + - freebsd go: - - 1.10.x + - 1.12 script: # build test for supported platforms diff --git a/vendor/github.com/valyala/gozstd/README.md b/vendor/github.com/valyala/gozstd/README.md index 95ee3c8a7..08e567f6d 100644 --- a/vendor/github.com/valyala/gozstd/README.md +++ b/vendor/github.com/valyala/gozstd/README.md @@ -67,7 +67,7 @@ and [Reader](https://godoc.org/github.com/valyala/gozstd#Reader) for stream deco 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`, `darwin/amd64`, `windows/amd64`. Pull requests for other platforms/architectures + 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?_ diff --git a/vendor/github.com/valyala/gozstd/libzstd_linux_amd64.a b/vendor/github.com/valyala/gozstd/libzstd_linux_amd64.a index 884d2ebe6..70550f2a5 100644 Binary files a/vendor/github.com/valyala/gozstd/libzstd_linux_amd64.a and b/vendor/github.com/valyala/gozstd/libzstd_linux_amd64.a differ diff --git a/vendor/github.com/valyala/gozstd/libzstd_linux_arm.a b/vendor/github.com/valyala/gozstd/libzstd_linux_arm.a index 4053c523b..38705b0c3 100644 Binary files a/vendor/github.com/valyala/gozstd/libzstd_linux_arm.a and b/vendor/github.com/valyala/gozstd/libzstd_linux_arm.a differ diff --git a/vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a b/vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a index b0a683dfd..d43968bed 100644 Binary files a/vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a and b/vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a differ diff --git a/vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a b/vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a index 5d1adceaf..54c18c2f3 100644 Binary files a/vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a and b/vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a differ diff --git a/vendor/github.com/valyala/gozstd/zstd.h b/vendor/github.com/valyala/gozstd/zstd.h index 4a1f81610..f8e95f228 100644 --- a/vendor/github.com/valyala/gozstd/zstd.h +++ b/vendor/github.com/valyala/gozstd/zstd.h @@ -71,7 +71,7 @@ extern "C" { /*------ Version ------*/ #define ZSTD_VERSION_MAJOR 1 #define ZSTD_VERSION_MINOR 4 -#define ZSTD_VERSION_RELEASE 2 +#define ZSTD_VERSION_RELEASE 3 #define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< to check runtime library version */ @@ -1909,7 +1909,7 @@ ZSTDLIB_API ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx); /*! Block functions produce and decode raw zstd blocks, without frame metadata. Frame metadata cost is typically ~18 bytes, which can be non-negligible for very small blocks (< 100 bytes). - User will have to take in charge required information to regenerate data, such as compressed and content sizes. + But users will have to take in charge needed metadata to regenerate data, such as compressed and content sizes. A few rules to respect : - Compressing and decompressing require a context structure @@ -1920,12 +1920,14 @@ ZSTDLIB_API ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx); + copyCCtx() and copyDCtx() can be used too - Block size is limited, it must be <= ZSTD_getBlockSize() <= ZSTD_BLOCKSIZE_MAX == 128 KB + If input is larger than a block size, it's necessary to split input data into multiple blocks - + For inputs larger than a single block, really consider using regular ZSTD_compress() instead. - Frame metadata is not that costly, and quickly becomes negligible as source size grows larger. - - When a block is considered not compressible enough, ZSTD_compressBlock() result will be zero. - In which case, nothing is produced into `dst` ! - + User must test for such outcome and deal directly with uncompressed data - + ZSTD_decompressBlock() doesn't accept uncompressed data as input !!! + + For inputs larger than a single block, consider using regular ZSTD_compress() instead. + Frame metadata is not that costly, and quickly becomes negligible as source size grows larger than a block. + - When a block is considered not compressible enough, ZSTD_compressBlock() result will be 0 (zero) ! + ===> In which case, nothing is produced into `dst` ! + + User __must__ test for such outcome and deal directly with uncompressed data + + A block cannot be declared incompressible if ZSTD_compressBlock() return value was != 0. + Doing so would mess up with statistics history, leading to potential data corruption. + + ZSTD_decompressBlock() _doesn't accept uncompressed data as input_ !! + In case of multiple successive blocks, should some of them be uncompressed, decoder must be informed of their existence in order to follow proper history. Use ZSTD_insertBlock() for such a case. diff --git a/vendor/modules.txt b/vendor/modules.txt index 0decdb5d8..e71b5dfb0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -19,7 +19,7 @@ github.com/valyala/fastjson github.com/valyala/fastjson/fastfloat # github.com/valyala/fastrand v1.0.0 github.com/valyala/fastrand -# github.com/valyala/gozstd v1.6.1 +# github.com/valyala/gozstd v1.6.2 github.com/valyala/gozstd # github.com/valyala/histogram v1.0.1 github.com/valyala/histogram