go2hx

manual

github

Module: stdgo.encoding.hex

(view library index)

Overview

Index

Variables

import stdgo.encoding.hex.Hex
var errLength:stdgo.Error

Classes

import stdgo.encoding.hex.*

class Hex

Package hex implements hexadecimal encoding and decoding.

Hex function benchmarkDecode

function benchmarkDecode(_b:stdgo._internal.testing.B):Void

(view code)

Hex function benchmarkDump

function benchmarkDump(_b:stdgo._internal.testing.B):Void

(view code)

Hex function benchmarkEncode

function benchmarkEncode(_b:stdgo._internal.testing.B):Void

(view code)

Hex function decode

function decode(_dst:Array<UInt>, _src:Array<UInt>):stdgo.Tuple<Int, stdgo.Error>
Decode decodes src into DecodedLen(len(src)) bytes,
        returning the actual number of bytes written to dst.

Decode expects that src contains only hexadecimal characters and that src has even length. If the input is malformed, Decode returns the number of bytes decoded before the error.

(view code)

Hex function decodeString

function decodeString(_s:String):stdgo.Tuple<Array<UInt>, stdgo.Error>

DecodeString returns the bytes represented by the hexadecimal string s.

DecodeString expects that src contains only hexadecimal characters and that src has even length. If the input is malformed, DecodeString returns the bytes decoded before the error.

(view code)

Hex function decodedLen

function decodedLen(_x:Int):Int
DecodedLen returns the length of a decoding of x source bytes.
        Specifically, it returns x / 2.

(view code)

Hex function dump

function dump(_data:Array<UInt>):String
Dump returns a string that contains a hex dump of the given data. The format
        of the hex dump matches the output of `hexdump -C` on the command line.

(view code)

Hex function dumper

function dumper(_w:stdgo._internal.io.Writer):stdgo._internal.io.WriteCloser
Dumper returns a WriteCloser that writes a hex dump of all written data to
        w. The format of the dump matches the output of `hexdump -C` on the command
        line.

(view code)

Hex function encode

function encode(_dst:Array<UInt>, _src:Array<UInt>):Int
Encode encodes src into EncodedLen(len(src))
        bytes of dst. As a convenience, it returns the number
        of bytes written to dst, but this value is always EncodedLen(len(src)).
        Encode implements hexadecimal encoding.

(view code)

Hex function encodeToString

function encodeToString(_src:Array<UInt>):String

EncodeToString returns the hexadecimal encoding of src.

(view code)

Hex function encodedLen

function encodedLen(_n:Int):Int
EncodedLen returns the length of an encoding of n source bytes.
        Specifically, it returns n * 2.

(view code)

Hex function newDecoder

function newDecoder(_r:stdgo._internal.io.Reader):stdgo._internal.io.Reader
NewDecoder returns an io.Reader that decodes hexadecimal characters from r.
        NewDecoder expects that r contain only an even number of hexadecimal characters.

(view code)

Hex function newEncoder

function newEncoder(_w:stdgo._internal.io.Writer):stdgo._internal.io.Writer

NewEncoder returns an io.Writer that writes lowercase hexadecimal characters to w.

(view code)

Hex function testDecode

function testDecode(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDecodeErr

function testDecodeErr(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDecodeString

function testDecodeString(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDecodeStringErr

function testDecodeStringErr(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDecoderErr

function testDecoderErr(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDump

function testDump(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDumper

function testDumper(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDumper_doubleclose

function testDumper_doubleclose(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testDumper_earlyclose

function testDumper_earlyclose(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testEncode

function testEncode(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testEncodeToString

function testEncodeToString(_t:stdgo._internal.testing.T_):Void

(view code)

Hex function testEncoderDecoder

function testEncoderDecoder(_t:stdgo._internal.testing.T_):Void

(view code)

Typedefs

import stdgo.encoding.hex.*

typedef InvalidByteError

typedef InvalidByteError = stdgo._internal.encoding.hex.InvalidByteError;

typedef T__struct_0

typedef T__struct_0 = stdgo._internal.encoding.hex.T__struct_0;

typedef T__struct_1

typedef T__struct_1 = stdgo._internal.encoding.hex.T__struct_1;

typedef T__struct_2

typedef T__struct_2 = stdgo._internal.encoding.hex.T__struct_2;

Abstracts

abstract T_encoder

(view file containing code)

abstract T_decoder

(view file containing code)

abstract T_dumper

(view file containing code)

abstract T_encDecTest

(view file containing code)