[archiver] Switch Brotli implementations with a pure Go one.
This commit is contained in:
parent
a4d2f0a64d
commit
4d3b19eae1
3 changed files with 6 additions and 3 deletions
|
@ -4,6 +4,7 @@ go 1.12
|
|||
|
||||
require (
|
||||
github.com/Pallinder/go-randomdata v1.2.0 // indirect
|
||||
github.com/andybalholm/brotli v1.0.4 // indirect
|
||||
github.com/colinmarc/cdb v0.0.0-00000000000000-000000000000
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/foobaz/go-zopfli v0.0.0-20140122214029-7432051485e2 // indirect
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg=
|
||||
github.com/Pallinder/go-randomdata v1.2.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y=
|
||||
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
|
||||
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/cipriancraciun/go-cdb-lib v0.0.0-20190809203657-d959ce9cc674 h1:UyoEJxLS9OPdjyinKfCA2aKgIf1NhXyIxneRSMrqZls=
|
||||
github.com/cipriancraciun/go-cdb-lib v0.0.0-20190809203657-d959ce9cc674/go.mod h1:/M2lSbkwYzIP5OqU4u+aygk4LCVpB7wi60O0Myhs05g=
|
||||
github.com/cipriancraciun/go-fasthttp v0.0.0-20190817151805-34223126fc19 h1:a+yE808Mqxm5W+Fxono2AKDPBpfNyDo/wKt6Rnsqb9E=
|
||||
|
|
|
@ -9,7 +9,7 @@ import "fmt"
|
|||
|
||||
|
||||
import "github.com/foobaz/go-zopfli/zopfli"
|
||||
import brotli "github.com/itchio/go-brotli/enc"
|
||||
import "github.com/andybalholm/brotli"
|
||||
|
||||
|
||||
|
||||
|
@ -83,9 +83,9 @@ func CompressBrotli (_data []byte) ([]byte, string, error) {
|
|||
|
||||
_buffer := & bytes.Buffer {}
|
||||
|
||||
_options := brotli.BrotliWriterOptions { Quality : 11, LGWin : 24}
|
||||
_options := brotli.WriterOptions { Quality : 11, LGWin : 24}
|
||||
|
||||
_encoder := brotli.NewBrotliWriter (_buffer, &_options)
|
||||
_encoder := brotli.NewWriterOptions (_buffer, _options)
|
||||
|
||||
if _, _error := _encoder.Write (_data); _error != nil {
|
||||
return nil, "", _error
|
||||
|
|
Loading…
Reference in a new issue