Home

Awesome

go-lzfse

GoDoc License

Go bindings for lzfse compression.


Install

go get github.com/iineva/go-lzfse

Examples

import (
    "io/ioutil"
    "log"

    lzfse "github.com/iineva/go-lzfse"
    "github.com/pkg/errors"
)

func main() {

    dat, err := ioutil.ReadFile("encoded.file")
    if err != nil {
        log.Fatal(errors.Wrap(err, "failed to read compressed file"))
    }

    decompressed = lzfse.DecodeBuffer(dat)

    err = ioutil.WriteFile("decoded.file", decompressed, 0644)
    if err != nil {
        log.Fatal(errors.Wrap(err, "failed to decompress file"))
    }
}

Credit

License

MIT Copyright (c) 2019 blacktop