Documentation ¶
Index ¶
Examples ¶
Constants ¶
const ( OPERAND_NONE byte = iota OPERAND_INT1 /* One byte signed integer. */ OPERAND_INT4 /* Four byte signed integer. */ OPERAND_UINT1 /* One byte unsigned integer. */ OPERAND_UINT4 /* Four byte unsigned integer. */ OPERAND_IDX4 /* Four byte signed index (actually an * integer, but displayed differently.) */ OPERAND_LVT1 /* One byte unsigned index into the local * variable table. */ OPERAND_LVT4 /* Four byte unsigned index into the local * variable table. */ OPERAND_AUX4 /* Four byte unsigned index into the aux data * table. */ OPERAND_OFFSET1 /* One byte signed jump offset. */ OPERAND_OFFSET4 /* Four byte signed jump offset. */ OPERAND_LIT1 /* One byte unsigned index into table of * literals. */ OPERAND_LIT4 /* Four byte unsigned index into table of * literals. */ OPERAND_SCLS1 /* Index into tclStringClassTable. */ )
const INT_MIN = 0x8000
Variables ¶
var ErrDecodeErr = errors.New("error decoding from bytes")
ErrDecodeErr mean error while decoding from bytes
var ErrUnsupoortedObjectType = errors.New("object type is not supported")
ErrUnsupoortedObjectType means object type is not correct
Functions ¶
func Decode ¶
Decode encodes src into at most len(src) bytes of dst, returning the actual number of bytes written.
The encoding handles 5-byte chunks, using a special encoding for the last fragment, so Encode is not appropriate for use on individual blocks of a large data stream. Use NewEncoder() instead.
Example ¶
src := []byte("4;,>!?.EH&ih-(!e2xi6zyiE<!22>:v35>:v22Ppv2j:U!*|yTv0#>6#5cSs!)'!") //src := []byte("z") dst := make([]byte, 280) length := Decode(dst, src) fmt.Printf("%s", string(dst[:length]))
Output: ,CHr@
func Encode ¶
Encode encodes src into at most MaxEncodedLen(len(src)) bytes of dst, returning the actual number of bytes written.
The encoding handles 4-byte chunks, using a special encoding for the last fragment, so Encode is not appropriate for use on individual blocks of a large data stream. Use NewEncoder() instead.
Example ¶
//src := []byte("testing aliases for non-existent targets") src := []byte{0, 0, 0, 0} dst := make([]byte, 280) length := Encode(dst, src) fmt.Printf("%s", dst[:length])
Output: ,CHr@
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder wrap decode for stream reader
func NewDecoder ¶
NewDecoder return Decoder which wrap Decode for stream reader
type InstructionDesc ¶
type InstructionDesc struct {
// contains filtered or unexported fields
}