encoding

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coder

type Coder interface {
	// Encode encodes the given byte slice.
	//
	// Parameter(s): p []byte
	// Return type(s): []byte
	Encode(p []byte) []byte

	// Decode decodes the given byte slice and returns the decoded byte slice and an error if any.
	//
	// Parameters:
	// - p: The byte slice to be decoded.
	//
	// Returns:
	// - []byte: The decoded byte slice.
	// - error: An error if any occurred during decoding.
	Decode(p []byte) ([]byte, error)

	// EncodeReader return a io.Reader that can be used to encode the given byte slice
	//
	// r io.Reader
	// io.Reader
	EncodeReader(r io.Reader) io.Reader

	// DecodeReader return a io.Reader that can be used to decode the given byte slice
	//
	// r io.Reader
	// io.Reader
	DecodeReader(r io.Reader) io.Reader

	// EncodeWriter return a io.writer that can be used to encode the given byte slice
	//
	// w io.Writer parameter.
	// io.Writer return type.
	EncodeWriter(w io.Writer) io.Writer

	// DecodeWriter return a io.writer that can be used to decode the given byte slice
	//
	// w io.Writer parameter.
	// io.Writer return type.
	DecodeWriter(w io.Writer) io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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