mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-19 07:01:02 +01:00
82a6e4efe5
Possible spelling mistake here.
13 lines
243 B
Go
13 lines
243 B
Go
package test
|
|
|
|
import "github.com/golang/snappy"
|
|
|
|
// Compress marshals and compresses wr.
|
|
func Compress(wr WriteRequest) ([]byte, error) {
|
|
data, err := wr.Marshal()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return snappy.Encode(nil, data), nil
|
|
}
|