Documentation ¶
Index ¶
- Constants
- func FromInt8(vec []int8) []byte
- type Buffer
- func (b *Buffer) Grow(size int)
- func (b *Buffer) Reset()
- func (b *Buffer) ToBytes() []byte
- func (b *Buffer) WriteHead(ty byte, tag byte) error
- func (b *Buffer) Write_bool(data bool, tag byte) error
- func (b *Buffer) Write_float32(data float32, tag byte) error
- func (b *Buffer) Write_float64(data float64, tag byte) error
- func (b *Buffer) Write_int16(data int16, tag byte) error
- func (b *Buffer) Write_int32(data int32, tag byte) error
- func (b *Buffer) Write_int64(data int64, tag byte) error
- func (b *Buffer) Write_int8(data int8, tag byte) error
- func (b *Buffer) Write_slice_int8(data []int8) error
- func (b *Buffer) Write_slice_uint8(data []uint8) error
- func (b *Buffer) Write_string(data string, tag byte) error
- func (b *Buffer) Write_uint16(data uint16, tag byte) error
- func (b *Buffer) Write_uint32(data uint32, tag byte) error
- func (b *Buffer) Write_uint8(data uint8, tag byte) error
- type Reader
- func (b *Reader) Next(n int) []byte
- func (b *Reader) Read_bool(data *bool, tag byte, require bool) error
- func (b *Reader) Read_float32(data *float32, tag byte, require bool) error
- func (b *Reader) Read_float64(data *float64, tag byte, require bool) error
- func (b *Reader) Read_int16(data *int16, tag byte, require bool) error
- func (b *Reader) Read_int32(data *int32, tag byte, require bool) error
- func (b *Reader) Read_int64(data *int64, tag byte, require bool) error
- func (b *Reader) Read_int8(data *int8, tag byte, require bool) error
- func (b *Reader) Read_slice_int8(data *[]int8, len int32, require bool) error
- func (b *Reader) Read_slice_uint8(data *[]uint8, len int32, require bool) error
- func (b *Reader) Read_string(data *string, tag byte, require bool) error
- func (b *Reader) Read_uint16(data *uint16, tag byte, require bool) error
- func (b *Reader) Read_uint32(data *uint32, tag byte, require bool) error
- func (b *Reader) Read_uint8(data *uint8, tag byte, require bool) error
- func (b *Reader) Skip(n int)
- func (b *Reader) SkipTo(ty, tag byte, require bool) (error, bool)
- func (b *Reader) SkipToNoCheck(tag byte, require bool) (error, bool, byte)
- func (b *Reader) SkipToStructEnd() error
Constants ¶
const ( BYTE byte = iota SHORT INT LONG FLOAT DOUBLE STRING1 STRING4 MAP LIST STRUCT_BEGIN STRUCT_END ZERO_TAG SIMPLE_LIST )
jce type
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is wrapper of bytes.Buffer
func (*Buffer) Write_bool ¶
Write_bool write bool with the tag.
func (*Buffer) Write_float32 ¶
Write_float32 writes float32 with the tag.
func (*Buffer) Write_float64 ¶
Write_float64 writes float64 with the tag.
func (*Buffer) Write_int16 ¶
Write_int16 writes the int16 with the tag.
func (*Buffer) Write_int32 ¶
Write_int32 write int32 with the tag.
func (*Buffer) Write_int64 ¶
Write_int64 write int64 with the tag.
func (*Buffer) Write_int8 ¶
Write_int8 write int8 with the tag.
func (*Buffer) Write_slice_int8 ¶
Write_slice_int8 wirte []int8 to the buffer.
func (*Buffer) Write_slice_uint8 ¶
Write_slice_uint8 wirte []uint8 to the buffer.
func (*Buffer) Write_string ¶
Write_string writes string data with the tag.
func (*Buffer) Write_uint16 ¶
Write_uint16 write uint16 with the tag.
func (*Buffer) Write_uint32 ¶
Write_uint32 write uint32 data with the tag.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is wapper of bytes.Reader
func (*Reader) Read_bool ¶
Read_bool reads the bool value for the tag and the require or optional sign.
func (*Reader) Read_float32 ¶
Read_float32 reads the float32 value for the tag and the require or optional sign.
func (*Reader) Read_float64 ¶
Read_float64 reads the float64 value for the tag and the require or optional sign.
func (*Reader) Read_int16 ¶
Read_int16 reads the int16 value for the tag and the require or optional sign.
func (*Reader) Read_int32 ¶
Read_int32 reads the int32 value for the tag and the require or optional sign.
func (*Reader) Read_int64 ¶
Read_int64 reads the int64 value for the tag and the require or optional sign.
func (*Reader) Read_int8 ¶
Read_int8 reads the int8 data for the tag and the require or optional sign.
func (*Reader) Read_slice_int8 ¶
Read_slice_int8 reads []int8 for the given length and the require or optional sign.
func (*Reader) Read_slice_uint8 ¶
Read_slice_uint8 reads []uint8 fore the given length and the require or optional sign.
func (*Reader) Read_string ¶
Read_string reads the string value for the tag and the require or optional sign.
func (*Reader) Read_uint16 ¶
Read_uint16 reads the uint16 value for the tag and the require or optional sign.
func (*Reader) Read_uint32 ¶
Read_uint32 reads the uint32 value for the tag and the require or optional sign.
func (*Reader) Read_uint8 ¶
Read_uint8 reads the uint8 for the tag and the require or optional sign.
func (*Reader) SkipToNoCheck ¶
SkipToNoCheck for skip to the none STRUCT_END tag.
func (*Reader) SkipToStructEnd ¶
SkipToStructEnd for skip to the STRUCT_END tag.