cborx

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0, LGPL-3.0 Imports: 5 Imported by: 2

Documentation

Overview

Package cborx provides the minimal canonical-CBOR encoding the fstree needs for byte-string-keyed maps (extended attributes), which fxamacker cannot produce from a Go map[string]... value because it emits text-string keys. Output follows RFC 8949 section 4.2 core deterministic encoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeXattrs

func DecodeXattrs(b []byte) (map[string][]byte, error)

DecodeXattrs parses a canonical CBOR map of byte-string keys to byte-string values, the inverse of EncodeXattrs. It accepts only the definite-length forms this package emits and rejects any trailing bytes.

func EncodeXattrs

func EncodeXattrs(m map[string][]byte) []byte

EncodeXattrs encodes m as a canonical CBOR map with byte-string keys and values, keys sorted by the bytewise lexicographic order of their CBOR encodings (RFC 8949 section 4.2). Used both inline (DirLeaf key 8) and as the XattrSet object body (key 9 target).

Types

This section is empty.

Jump to

Keyboard shortcuts

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