encoding

package
v0.0.0-...-ad2634f Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BCD    = &bcdEncoder{}
	TRACK2 = &bcdTrack2Encoder{}
)
View Source
var (
	ASCII = &asciiEncoder{}
)
View Source
var (
	ASCIIHexToBytes = &asciiToHexEncoder{}
)

ASCII To HEX encoder

View Source
var (
	BerTLVTag = &berTLVEncoderTag{}
)
View Source
var (
	Binary = &binaryEncoder{}
)
View Source
var (
	BytesToASCIIHex = &hexToASCIIEncoder{}
)

HEX to ASCII encoder

View Source
var (
	EBCDIC = &ebcdicEncoder{}
)
View Source
var EBCDIC1047 = &ebcdic1047Encoder{
	encoder: charmap.CodePage1047.NewEncoder(),
	decoder: charmap.CodePage1047.NewDecoder(),
}

EBCDIC1047 is an encoder for EBCDIC characters using IBM Code Page 1047.

View Source
var (
	LBCD = &lBCDEncoder{}
)

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	// Encode encodes source data (ASCII, characters, digits, etc.) into
	// destination bytes. It returns encoded bytes and any error
	Encode([]byte) ([]byte, error)

	// Decode decodes data into bytes (ASCII, characters, digits,
	// etc.). It returns the bytes representing the decoded data, the
	// number of bytes read from the input, and any error
	Decode([]byte, int) (data []byte, read int, err error)
}

Jump to

Keyboard shortcuts

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