Go bindings for lzfse compression.
go get github.com/blacktop/lzfse-cgo
import (
"log"
"os"
"github.com/blacktop/lzfse-cgo"
)
func main() {
dat, err := os.ReadFile("encoded.file")
if err != nil {
log.Fatal(fmt.Errorf("failed to read compressed file: %v", err))
}
decompressed = lzfse.DecodeBuffer(dat)
err = os.WriteFile("decoded.file", decompressed, 0644)
if err != nil {
log.Fatal(fmt.Errorf("failed to decompress file: %v", err))
}
}
MIT Copyright (c) 2019-2024 blacktop