mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
Merge pull request #103 from nicolashardy/patch-1
Improve compression speed
This commit is contained in:
commit
fc38472015
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ import (
|
||||||
// Compress returns a compressed byte slice.
|
// Compress returns a compressed byte slice.
|
||||||
func Compress(src []byte) []byte {
|
func Compress(src []byte) []byte {
|
||||||
compressedData := new(bytes.Buffer)
|
compressedData := new(bytes.Buffer)
|
||||||
compress(src, compressedData, 9)
|
compress(src, compressedData, -2)
|
||||||
return compressedData.Bytes()
|
return compressedData.Bytes()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue