Registry / utility / cloudflare-golz4

cloudflare-golz4

JSON →
library0.0.0-20260424003259-e25acaa6ef8cgogounverified

A Go binding for LZ4 compression using the C libraries lz4.c and lz4hc.c.

go get github.com/cloudflare/golz4
INSTALL
IMPORT
SIG · CLOUDFLARE-GOLZ4
C
cloudflare-golz4
utilitygov0.0.0-20260424003259-e25acaa6ef8c
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lz4
github.com/cloudflare/golz4

Compress a byte slice using LZ4.

package main import ( "fmt" "github.com/cloudflare/golz4" ) func main() { data := []byte("hello") compressed, err := lz4.Compress(data) if err != nil { panic(err) } fmt.Printf("Compressed: %x\n", compressed) }
Debug
Known issues
gotchaRequires CGO and the LZ4 C library to be installed.
fix
Install liblz4-dev or equivalent, and ensure CGO_ENABLED=1.
affects: >=0.0.0
Upgrade
Version history
0.0.0-20260424003259-e25acaa6ef8clatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
cloudflare-golz4 — go get cloudflare-golz4 · libregistry