encoding

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CBOR

type CBOR[T CBORMarshalUnmarshaler] struct{}

func NewCBOR

func NewCBOR[T CBORMarshalUnmarshaler]() *CBOR[T]

func (*CBOR[T]) Decode

func (c *CBOR[T]) Decode(v []byte, t T) (_err error)

func (*CBOR[T]) Encode

func (c *CBOR[T]) Encode(m T) (_ []byte, _err error)

type CBORMarshalUnmarshaler

type CBORMarshalUnmarshaler interface {
	cbg.CBORMarshaler
	cbg.CBORUnmarshaler
}

type EncodeDecoder

type EncodeDecoder[T CBORMarshalUnmarshaler] interface {
	Encode(v T) ([]byte, error)
	Decode([]byte, T) error
}

type ZSTD

type ZSTD[T CBORMarshalUnmarshaler] struct {
	// contains filtered or unexported fields
}

func NewZSTD

func NewZSTD[T CBORMarshalUnmarshaler]() (*ZSTD[T], error)

func (*ZSTD[T]) Decode

func (c *ZSTD[T]) Decode(compressed []byte, t T) (_err error)

func (*ZSTD[T]) Encode

func (c *ZSTD[T]) Encode(t T) (_ []byte, _err error)

Jump to

Keyboard shortcuts

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