lzfse

package module
v1.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 6 Imported by: 4

README

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

Documentation

Overview

Package lzfse provides Go bindings for lzfse.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBuffer

func DecodeBuffer(srcBuffer []byte) []byte

DecodeBuffer function as declared in lzfse.h:126

func DecodeLZVNBuffer added in v1.1.17

func DecodeLZVNBuffer(encBuf, decBuf []byte) uint

DecodeLZVNBuffer function as declared in lzfse_internal.h:413

func DecodeScratchSize

func DecodeScratchSize() uint

DecodeScratchSize function as declared in lzfse.h:94

func EncodeBuffer

func EncodeBuffer(srcBuffer []byte) []byte

EncodeBuffer function as declared in lzfse.h:87

func EncodeLZVNBuffer added in v1.1.17

func EncodeLZVNBuffer(srcBuf, dstBuf []byte) uint

EncodeLZVNBuffer function as declared in lzvn_encode_base.c:383

func EncodeScratchSize

func EncodeScratchSize() uint

EncodeScratchSize function as declared in lzfse.h:56

func LzBitMapDecompress added in v1.1.19

func LzBitMapDecompress(src, dst []byte) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL