Skip to content

blacktop/lzfse-cgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lzfse-cgo

GitHub Workflow Status GoDoc GitHub release (latest by date) GitHub

Go bindings for lzfse compression.


Install

go get github.com/blacktop/lzfse-cgo

Getting Started

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))
    }
}

Credit

License

MIT Copyright (c) 2019-2024 blacktop