mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
26 lines
465 B
Go
26 lines
465 B
Go
|
// +build cgo
|
||
|
|
||
|
package zstd
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"github.com/valyala/gozstd"
|
||
|
)
|
||
|
|
||
|
// Reader is zstd reader
|
||
|
type Reader = gozstd.Reader
|
||
|
|
||
|
// NewReader returns zstd reader for the given r.
|
||
|
func NewReader(r io.Reader) *Reader {
|
||
|
return gozstd.NewReader(r)
|
||
|
}
|
||
|
|
||
|
// Writer is zstd writer
|
||
|
type Writer = gozstd.Writer
|
||
|
|
||
|
// NewWriterLevel returns zstd writer for the given w and level.
|
||
|
func NewWriterLevel(w io.Writer, level int) *Writer {
|
||
|
return gozstd.NewWriterLevel(w, level)
|
||
|
}
|