mssqlbulkloader/zstdreader.go

26 lines
351 B
Go
Raw Permalink Normal View History

2023-04-17 20:30:54 +05:00
package main
import (
"os"
"github.com/klauspost/compress/zstd"
)
type ZstdReader struct{}
func (zr *ZstdReader) Process(options *Options) error {
f, err := os.Open(options.filePath)
if err != nil {
return err
}
defer f.Close()
r, err := zstd.NewReader(f)
if err != nil {
return err
}
defer r.Close()
return process(f, options)
}