Skip to content

Encode

This example demonstrates encoding worldSeed, typeSeq, and index values into a deterministic, sortable UUID v8 PseudoID. The encoded ID preserves all three values and can be decoded back to its original components.

Expected Output

<uuid_v8>

The <uuid_v8> is a UUID v8 format PseudoID that encodes worldSeed, typeSeq and index.

Source Codes

package main
import "github.com/pseudata/pseudata"
func main() {
id := pseudata.EncodeID(42, 100, 1)
println(id)
}