Go

StringZilla for Go

go get github.com/ashvardanian/stringzilla/golang 6.0.0-rc.1 · 91a27bdd

This package is a thin cgo binding, the sz package, over the precompiled StringZilla static library.

Unlike the standard strings package, StringZilla primarily targets byte-level binary data processing, with less emphasis on UTF-8 and locale-specific tasks. Where it does expose UTF-8 helpers, they are documented as such below.

It requires Go 1.24 or newer to leverage the cgo noescape and nocallback directives. Without those the latency of calling C functions from Go would be too high to be useful for string processing.

Topics

Installation
Types1
Searching and Counting9These functions mirror the corresponding helpers in the standard strings package, but operate on raw bytes.
Case Folding and Normalization7The binding exposes codepoint counting, Unicode normalization, and full case folding over UTF-8 bytes.
Hashing and Checksums16
Runtime Dispatch12