encoding

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package encoding provides functionality for encoding and decoding data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GobDecoder

func GobDecoder(r io.Reader, v any) error

GobDecoder decodes gob data from a reader into a value

func GobEncoder

func GobEncoder(w io.Writer, v any) (int, error)

GobEncoder encodes a value into gob and writes it to a writer

func GzipJSONDecoder

func GzipJSONDecoder(r io.Reader, v any) error

GzipJSONDecoder decodes gzip-compressed JSON data from a reader into a value

func GzipJSONEncoder

func GzipJSONEncoder(w io.Writer, v any) (int, error)

GzipJSONEncoder encodes a value into gzip-compressed JSON and writes it to a writer

func JSONDecoder

func JSONDecoder(r io.Reader, v any) error

JSONDecoder decodes JSON data from a reader into a value

func JSONEncoder

func JSONEncoder(w io.Writer, v any) (int, error)

JSONEncoder encodes a value into JSON and writes it to a writer

func ZlibCBORDecoder

func ZlibCBORDecoder(r io.Reader, v any) error

ZlibCBORDecoder decodes zlib-compressed CBOR data from a reader into a value

func ZlibCBOREncoder

func ZlibCBOREncoder(w io.Writer, v any) (int, error)

ZlibCBOREncoder encodes a value into zlib-compressed CBOR data and writes it to a writer

Types

type DecoderFunc

type DecoderFunc func(r io.Reader, v any) error

DecoderFunc defines a function type for decoding data from a reader into a value

type EncoderFunc

type EncoderFunc func(w io.Writer, v any) (int, error)

EncoderFunc defines a function type for encoding a value into a writer

Jump to

Keyboard shortcuts

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