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)}import dev.pseudata.IDUtils;
public class Main { public static void main(String[] args) { String id = IDUtils.encodeId(42, 100, 1);
System.out.println(id); }}from pseudata import encode_id
id = encode_id(42, 100, 1)
print(id)import { encodeId } from "@pseudata/core";
const id = encodeId(42n, 100, 1n);
console.log(id);© 2025 Pseudata Project. Open Source under Apache License 2.0. · RSS Feed