Documentation
¶
Index ¶
- type Decoder
- type DecoderCommon
- func (cd *DecoderCommon) ReadSize1(index int, d *[]byte) (byte, int)
- func (cd *DecoderCommon) ReadSize2(index int, d *[]byte) ([]byte, int)
- func (cd *DecoderCommon) ReadSize4(index int, d *[]byte) ([]byte, int)
- func (cd *DecoderCommon) ReadSize8(index int, d *[]byte) ([]byte, int)
- func (cd *DecoderCommon) ReadSizeN(index, n int, d *[]byte) ([]byte, int)
- type Encoder
- type EncoderCommon
- func (c *EncoderCommon) SetByte1Int(code, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte1Int64(value int64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte1Uint64(value uint64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte2Int(value int, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte2Int64(value int64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte2Uint64(value uint64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte4Int(value int, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte4Int64(value int64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte4Uint32(value uint32, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte4Uint64(value uint64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte8Int64(value int64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetByte8Uint64(value uint64, offset int, d *[]byte) int
- func (c *EncoderCommon) SetBytes(bs []byte, offset int, d *[]byte) int
- type StreamDecoder
- type StreamEncoder
- type StreamWriter
- func (w *StreamWriter) WriteByte1Int(value int) error
- func (w *StreamWriter) WriteByte1Int64(value int64) error
- func (w *StreamWriter) WriteByte1Uint64(value uint64) error
- func (w *StreamWriter) WriteByte2Int(value int) error
- func (w *StreamWriter) WriteByte2Int64(value int64) error
- func (w *StreamWriter) WriteByte2Uint64(value uint64) error
- func (w *StreamWriter) WriteByte4Int(value int) error
- func (w *StreamWriter) WriteByte4Int64(value int64) error
- func (w *StreamWriter) WriteByte4Uint32(value uint32) error
- func (w *StreamWriter) WriteByte4Uint64(value uint64) error
- func (w *StreamWriter) WriteByte8Int64(value int64) error
- func (w *StreamWriter) WriteByte8Uint64(value uint64) error
- func (w *StreamWriter) WriteBytes(bs []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderCommon ¶
type DecoderCommon struct { }
func (*DecoderCommon) ReadSize1 ¶
func (cd *DecoderCommon) ReadSize1(index int, d *[]byte) (byte, int)
func (*DecoderCommon) ReadSize2 ¶
func (cd *DecoderCommon) ReadSize2(index int, d *[]byte) ([]byte, int)
func (*DecoderCommon) ReadSize4 ¶
func (cd *DecoderCommon) ReadSize4(index int, d *[]byte) ([]byte, int)
type EncoderCommon ¶
type EncoderCommon struct { }
func (*EncoderCommon) SetByte1Int ¶
func (c *EncoderCommon) SetByte1Int(code, offset int, d *[]byte) int
func (*EncoderCommon) SetByte1Int64 ¶
func (c *EncoderCommon) SetByte1Int64(value int64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte1Uint64 ¶
func (c *EncoderCommon) SetByte1Uint64(value uint64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte2Int ¶
func (c *EncoderCommon) SetByte2Int(value int, offset int, d *[]byte) int
func (*EncoderCommon) SetByte2Int64 ¶
func (c *EncoderCommon) SetByte2Int64(value int64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte2Uint64 ¶
func (c *EncoderCommon) SetByte2Uint64(value uint64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte4Int ¶
func (c *EncoderCommon) SetByte4Int(value int, offset int, d *[]byte) int
func (*EncoderCommon) SetByte4Int64 ¶
func (c *EncoderCommon) SetByte4Int64(value int64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte4Uint32 ¶
func (c *EncoderCommon) SetByte4Uint32(value uint32, offset int, d *[]byte) int
func (*EncoderCommon) SetByte4Uint64 ¶
func (c *EncoderCommon) SetByte4Uint64(value uint64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte8Int64 ¶
func (c *EncoderCommon) SetByte8Int64(value int64, offset int, d *[]byte) int
func (*EncoderCommon) SetByte8Uint64 ¶
func (c *EncoderCommon) SetByte8Uint64(value uint64, offset int, d *[]byte) int
type StreamDecoder ¶ added in v2.2.0
type StreamEncoder ¶ added in v2.2.0
type StreamEncoder interface { Code() int8 Type() reflect.Type Write(w StreamWriter, value reflect.Value) error }
StreamEncoder is interface that extended encoder should implement
type StreamWriter ¶ added in v2.2.2
type StreamWriter struct {
// contains filtered or unexported fields
}
StreamWriter is provided some writing functions for extended format by user
func CreateStreamWriter ¶ added in v2.2.2
func CreateStreamWriter(w io.Writer, buf *common.Buffer) StreamWriter
func (*StreamWriter) WriteByte1Int ¶ added in v2.2.2
func (w *StreamWriter) WriteByte1Int(value int) error
func (*StreamWriter) WriteByte1Int64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte1Int64(value int64) error
func (*StreamWriter) WriteByte1Uint64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte1Uint64(value uint64) error
func (*StreamWriter) WriteByte2Int ¶ added in v2.2.2
func (w *StreamWriter) WriteByte2Int(value int) error
func (*StreamWriter) WriteByte2Int64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte2Int64(value int64) error
func (*StreamWriter) WriteByte2Uint64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte2Uint64(value uint64) error
func (*StreamWriter) WriteByte4Int ¶ added in v2.2.2
func (w *StreamWriter) WriteByte4Int(value int) error
func (*StreamWriter) WriteByte4Int64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte4Int64(value int64) error
func (*StreamWriter) WriteByte4Uint32 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte4Uint32(value uint32) error
func (*StreamWriter) WriteByte4Uint64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte4Uint64(value uint64) error
func (*StreamWriter) WriteByte8Int64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte8Int64(value int64) error
func (*StreamWriter) WriteByte8Uint64 ¶ added in v2.2.2
func (w *StreamWriter) WriteByte8Uint64(value uint64) error
func (*StreamWriter) WriteBytes ¶ added in v2.2.2
func (w *StreamWriter) WriteBytes(bs []byte) error
Click to show internal directories.
Click to hide internal directories.