vendor: update github.com/valyala/gozstd from v1.6.3 to v1.6.4

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/281
This commit is contained in:
Aliaksandr Valialkin 2019-12-26 19:30:05 +02:00
parent 6f67e0b56b
commit 17a4dc9782
4 changed files with 8 additions and 14 deletions

2
go.mod
View File

@ -13,7 +13,7 @@ require (
github.com/klauspost/compress v1.9.4
github.com/valyala/fastjson v1.4.1
github.com/valyala/fastrand v1.0.0
github.com/valyala/gozstd v1.6.3
github.com/valyala/gozstd v1.6.4
github.com/valyala/histogram v1.0.1
github.com/valyala/quicktemplate v1.4.1
go.opencensus.io v0.22.2 // indirect

4
go.sum
View File

@ -101,8 +101,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.3 h1:kr3oF/F1RvxYr8wgPjrH04gvHuMEL99pPC9e+5pPQdU=
github.com/valyala/gozstd v1.6.3/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ=
github.com/valyala/gozstd v1.6.4 h1:nFLddjEf90SFl5cVWyElSHozQDsbvLljPK703/skBS0=
github.com/valyala/gozstd v1.6.4/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.4.1 h1:tEtkSN6mTCJlYVT7As5x4wjtkk2hj2thsb0M+AcAVeM=

View File

@ -122,9 +122,7 @@ func compress(cctx, cctxDict *cctxWrapper, dst, src []byte, cd *CDict, compressi
dstLen := len(dst)
if cap(dst) > dstLen {
// Fast path - try compressing without dst resize.
dst = dst[:cap(dst)]
result := compressInternal(cctx, cctxDict, dst[dstLen:], src, cd, compressionLevel, false)
result := compressInternal(cctx, cctxDict, dst[dstLen:cap(dst)], src, cd, compressionLevel, false)
compressedSize := int(result)
if compressedSize >= 0 {
// All OK.
@ -143,9 +141,8 @@ func compress(cctx, cctxDict *cctxWrapper, dst, src []byte, cd *CDict, compressi
// This should be optimized since go 1.11 - see https://golang.org/doc/go1.11#performance-compiler.
dst = append(dst[:cap(dst)], make([]byte, n)...)
}
dst = dst[:dstLen+compressBound]
result := compressInternal(cctx, cctxDict, dst[dstLen:], src, cd, compressionLevel, true)
result := compressInternal(cctx, cctxDict, dst[dstLen:dstLen+compressBound], src, cd, compressionLevel, true)
compressedSize := int(result)
return dst[:dstLen+compressedSize]
}
@ -247,9 +244,7 @@ func decompress(dctx, dctxDict *dctxWrapper, dst, src []byte, dd *DDict) ([]byte
dstLen := len(dst)
if cap(dst) > dstLen {
// Fast path - try decompressing without dst resize.
dst = dst[:cap(dst)]
result := decompressInternal(dctx, dctxDict, dst[dstLen:], src, dd)
result := decompressInternal(dctx, dctxDict, dst[dstLen:cap(dst)], src, dd)
decompressedSize := int(result)
if decompressedSize >= 0 {
// All OK.
@ -279,9 +274,8 @@ func decompress(dctx, dctxDict *dctxWrapper, dst, src []byte, dd *DDict) ([]byte
// This should be optimized since go 1.11 - see https://golang.org/doc/go1.11#performance-compiler.
dst = append(dst[:cap(dst)], make([]byte, n)...)
}
dst = dst[:dstLen+decompressBound]
result := decompressInternal(dctx, dctxDict, dst[dstLen:], src, dd)
result := decompressInternal(dctx, dctxDict, dst[dstLen:dstLen+decompressBound], src, dd)
decompressedSize := int(result)
if decompressedSize >= 0 {
// All OK.

2
vendor/modules.txt vendored
View File

@ -95,7 +95,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.3
# github.com/valyala/gozstd v1.6.4
github.com/valyala/gozstd
# github.com/valyala/histogram v1.0.1
github.com/valyala/histogram