vendor: update klauspost/reedsomon package with upstream changes. (#1912)

master
Harshavardhana 9 years ago committed by GitHub
parent 466a2e01f1
commit 7f38f46e20
  1. 20
      vendor/github.com/klauspost/reedsolomon/appveyor.yml
  2. 12
      vendor/github.com/klauspost/reedsolomon/reedsolomon.go
  3. 4
      vendor/vendor.json

@ -0,0 +1,20 @@
os: Visual Studio 2015
platform: x64
clone_folder: c:\gopath\src\github.com\klauspost\reedsolomon
# environment variables
environment:
GOPATH: c:\gopath
install:
- echo %PATH%
- echo %GOPATH%
- go version
- go env
- go get -d ./...
build_script:
- go test -v -cpu=2 ./...
- go test -cpu=1,2,4 -short -race ./...

@ -85,10 +85,14 @@ type reedSolomon struct {
} }
// ErrInvShardNum will be returned by New, if you attempt to create // ErrInvShardNum will be returned by New, if you attempt to create
// an Encoder where either data or parity shards is zero or less, // an Encoder where either data or parity shards is zero or less.
// or the number of data shards is higher than 256.
var ErrInvShardNum = errors.New("cannot create Encoder with zero or less data/parity shards") var ErrInvShardNum = errors.New("cannot create Encoder with zero or less data/parity shards")
// ErrMaxShardNum will be returned by New, if you attempt to create
// an Encoder where data and parity shards cannot be bigger than
// Galois field GF(2^8) - 1.
var ErrMaxShardNum = errors.New("cannot create Encoder with 255 or more data+parity shards")
// New creates a new encoder and initializes it to // New creates a new encoder and initializes it to
// the number of data shards and parity shards that // the number of data shards and parity shards that
// you want to use. You can reuse this encoder. // you want to use. You can reuse this encoder.
@ -104,8 +108,8 @@ func New(dataShards, parityShards int) (Encoder, error) {
return nil, ErrInvShardNum return nil, ErrInvShardNum
} }
if dataShards > 256 { if dataShards+parityShards > 255 {
return nil, ErrInvShardNum return nil, ErrMaxShardNum
} }
// Start with a Vandermonde matrix. This matrix would work, // Start with a Vandermonde matrix. This matrix would work,

@ -69,8 +69,8 @@
}, },
{ {
"path": "github.com/klauspost/reedsolomon", "path": "github.com/klauspost/reedsolomon",
"revision": "4fadad856421f3f13883bd681de8a9283809076e", "revision": "2fde63d2889a399426862a16611c489b1fed87bc",
"revisionTime": "2016-05-01T12:00:51+02:00" "revisionTime": "2016-06-04T08:05:20+02:00"
}, },
{ {
"path": "github.com/mattn/go-colorable", "path": "github.com/mattn/go-colorable",

Loading…
Cancel
Save