Documentation ¶
Index ¶
- type Buffer
- type NocopyBuffer
- func (b *NocopyBuffer) Bytes() []byte
- func (b *NocopyBuffer) Len() int
- func (b *NocopyBuffer) Malloc(cap int, whence ...Whence) *Writer
- func (b *NocopyBuffer) Mount(block interface{}, whence ...Whence)
- func (b *NocopyBuffer) Nodes() int
- func (b *NocopyBuffer) Range(fn func(node *NocopyNode) bool)
- func (b *NocopyBuffer) Release()
- type NocopyNode
- type Reader
- func (r *Reader) ReadBool() (bool, error)
- func (r *Reader) ReadBools(n int) ([]bool, error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadBytes(n int) ([]byte, error)
- func (r *Reader) ReadFloat32(order binary.ByteOrder) (float32, error)
- func (r *Reader) ReadFloat32s(order binary.ByteOrder, n int) ([]float32, error)
- func (r *Reader) ReadFloat64(order binary.ByteOrder) (float64, error)
- func (r *Reader) ReadFloat64s(order binary.ByteOrder, n int) ([]float64, error)
- func (r *Reader) ReadInt16(order binary.ByteOrder) (int16, error)
- func (r *Reader) ReadInt16s(order binary.ByteOrder, n int) ([]int16, error)
- func (r *Reader) ReadInt32(order binary.ByteOrder) (int32, error)
- func (r *Reader) ReadInt32s(order binary.ByteOrder, n int) ([]int32, error)
- func (r *Reader) ReadInt64(order binary.ByteOrder) (int64, error)
- func (r *Reader) ReadInt64s(order binary.ByteOrder, n int) ([]int64, error)
- func (r *Reader) ReadInt8() (int8, error)
- func (r *Reader) ReadInt8s(n int) ([]int8, error)
- func (r *Reader) ReadRune(order binary.ByteOrder) (rune, error)
- func (r *Reader) ReadRunes(order binary.ByteOrder, n int) ([]rune, error)
- func (r *Reader) ReadString(len int) (string, error)
- func (r *Reader) ReadUint16(order binary.ByteOrder) (uint16, error)
- func (r *Reader) ReadUint16s(order binary.ByteOrder, n int) ([]uint16, error)
- func (r *Reader) ReadUint32(order binary.ByteOrder) (uint32, error)
- func (r *Reader) ReadUint32s(order binary.ByteOrder, n int) ([]uint32, error)
- func (r *Reader) ReadUint64(order binary.ByteOrder) (uint64, error)
- func (r *Reader) ReadUint64s(order binary.ByteOrder, n int) ([]uint64, error)
- func (r *Reader) ReadUint8() (uint8, error)
- func (r *Reader) ReadUint8s(n int) ([]uint8, error)
- func (r *Reader) Reset()
- func (r *Reader) Seek(offset int64, whence int) (int64, error)
- type Whence
- type Writer
- func (w *Writer) Available() int
- func (w *Writer) Bytes() []byte
- func (w *Writer) Cap() int
- func (w *Writer) Grow(n int)
- func (w *Writer) Len() int
- func (w *Writer) Reset()
- func (w *Writer) Write(p []byte) (n int, err error)
- func (w *Writer) WriteBools(values ...bool)
- func (w *Writer) WriteBytes(values ...byte)
- func (w *Writer) WriteFloat32s(order binary.ByteOrder, values ...float32)
- func (w *Writer) WriteFloat64s(order binary.ByteOrder, values ...float64)
- func (w *Writer) WriteInt16s(order binary.ByteOrder, values ...int16)
- func (w *Writer) WriteInt32s(order binary.ByteOrder, values ...int32)
- func (w *Writer) WriteInt64s(order binary.ByteOrder, values ...int64)
- func (w *Writer) WriteInt8s(values ...int8)
- func (w *Writer) WriteRunes(order binary.ByteOrder, values ...rune)
- func (w *Writer) WriteString(str string)
- func (w *Writer) WriteUint16s(order binary.ByteOrder, values ...uint16)
- func (w *Writer) WriteUint32s(order binary.ByteOrder, values ...uint32)
- func (w *Writer) WriteUint64s(order binary.ByteOrder, values ...uint64)
- func (w *Writer) WriteUint8s(values ...uint8)
- type WriterPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NocopyBuffer ¶
type NocopyBuffer struct {
// contains filtered or unexported fields
}
func NewNocopyBuffer ¶
func NewNocopyBuffer(blocks ...interface{}) *NocopyBuffer
func (*NocopyBuffer) Malloc ¶
func (b *NocopyBuffer) Malloc(cap int, whence ...Whence) *Writer
Malloc 分配一块内存给Writer
func (*NocopyBuffer) Mount ¶
func (b *NocopyBuffer) Mount(block interface{}, whence ...Whence)
Mount 挂载块到Buffer上
type NocopyNode ¶
type NocopyNode struct {
// contains filtered or unexported fields
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadFloat32 ¶
ReadFloat32 读取float32值
func (*Reader) ReadFloat32s ¶
ReadFloat32s 读取多个float32值
func (*Reader) ReadFloat64 ¶
ReadFloat64 读取float64值
func (*Reader) ReadFloat64s ¶
ReadFloat64s 读取多个float64值
func (*Reader) ReadInt16s ¶
ReadInt16s 读取多个int16值
func (*Reader) ReadInt32s ¶
ReadInt32s 读取多个int32值
func (*Reader) ReadInt64s ¶
ReadInt64s 读取多个int64值
func (*Reader) ReadString ¶
ReadString 读取string值
func (*Reader) ReadUint16 ¶
ReadUint16 读取uint16值
func (*Reader) ReadUint16s ¶
ReadUint16s 读取多个uint16值
func (*Reader) ReadUint32 ¶
ReadUint32 读取uint32值
func (*Reader) ReadUint32s ¶
ReadUint32s 读取多个uint32值
func (*Reader) ReadUint64 ¶
ReadUint64 读取uint64值
func (*Reader) ReadUint64s ¶
ReadUint64s 读取多个uint64值
func (*Reader) ReadUint8s ¶
ReadUint8s 读取多个uint8值
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) WriteFloat32s ¶
WriteFloat32s 写入float32
func (*Writer) WriteFloat64s ¶
WriteFloat64s 写入float64
func (*Writer) WriteInt16s ¶
WriteInt16s 写入int16
func (*Writer) WriteInt32s ¶
WriteInt32s 写入int32
func (*Writer) WriteInt64s ¶
WriteInt64s 写入int64
func (*Writer) WriteRunes ¶
WriteRunes 写入rune
func (*Writer) WriteUint16s ¶
WriteUint16s 写入uint16
func (*Writer) WriteUint32s ¶
WriteUint32s 写入uint32
func (*Writer) WriteUint64s ¶
WriteUint64s 写入uint64
type WriterPool ¶
type WriterPool struct {
// contains filtered or unexported fields
}
func NewWriterPool ¶
func NewWriterPool(capacities []int) *WriterPool
Click to show internal directories.
Click to hide internal directories.