Versions in this module Expand all Collapse all v0 v0.3.0 Mar 9, 2022 v0.2.0 Jan 5, 2022 Changes in this version + const KB + const MB + var ErrTooLarge = errors.New("goetty.ByteBuf: too large") + func Byte2Int(data []byte) int + func Byte2Int64(data []byte) int64 + func Byte2UInt16(data []byte) uint16 + func Byte2UInt32(data []byte) uint32 + func Byte2UInt64(data []byte) uint64 + func Int2Bytes(v int) []byte + func Int2BytesTo(v int, ret []byte) + func Int64ToBytes(v int64) []byte + func Int64ToBytesTo(v int64, ret []byte) + func ReadInt(r io.Reader) (int, error) + func ReadN(r io.Reader, n int) ([]byte, error) + func UInt16ToBytes(v uint16) []byte + func UInt32ToBytes(v uint32) []byte + func Uint16ToBytesTo(v uint16, ret []byte) + func Uint32ToBytesTo(v uint32, ret []byte) + func Uint64ToBytesTo(v uint64, ret []byte) + func UseMemPool(min, max int) + type ByteBuf struct + func NewByteBuf(capacity int) *ByteBuf + func NewByteBufPool(capacity int, pool Pool) *ByteBuf + func WrapBytes(data []byte) *ByteBuf + func (b *ByteBuf) Capacity() int + func (b *ByteBuf) Clear() + func (b *ByteBuf) Expansion(n int) + func (b *ByteBuf) GetMarkedRemind() int + func (b *ByteBuf) GetMarkedRemindData() []byte + func (b *ByteBuf) GetMarkerIndex() int + func (b *ByteBuf) GetReaderIndex() int + func (b *ByteBuf) GetWriteIndex() int + func (b *ByteBuf) MarkIndex(index int) error + func (b *ByteBuf) MarkN(n int) error + func (b *ByteBuf) MarkWrite() + func (b *ByteBuf) MarkedBytesReaded() + func (b *ByteBuf) PeekByte(offset int) (byte, error) + func (b *ByteBuf) PeekInt(offset int) (int, error) + func (b *ByteBuf) PeekN(offset int, n int) ([]byte, error) + func (b *ByteBuf) RawBuf() []byte + func (b *ByteBuf) Read(p []byte) (n int, err error) + func (b *ByteBuf) ReadAll() (int, []byte, error) + func (b *ByteBuf) ReadByte() (byte, error) + func (b *ByteBuf) ReadBytes(n int) (int, []byte, error) + func (b *ByteBuf) ReadFrom(r io.Reader) (n int64, err error) + func (b *ByteBuf) ReadInt() (int, error) + func (b *ByteBuf) ReadInt64() (int64, error) + func (b *ByteBuf) ReadMarkedBytes() (int, []byte, error) + func (b *ByteBuf) ReadRawBytes(n int) (int, []byte, error) + func (b *ByteBuf) ReadUInt16() (uint16, error) + func (b *ByteBuf) ReadUInt32() (uint32, error) + func (b *ByteBuf) ReadUInt64() (uint64, error) + func (b *ByteBuf) Readable() int + func (b *ByteBuf) Release() + func (b *ByteBuf) Resume(capacity int) + func (b *ByteBuf) SetReaderIndex(newReaderIndex int) error + func (b *ByteBuf) SetWriterIndex(newWriterIndex int) error + func (b *ByteBuf) Skip(n int) error + func (b *ByteBuf) Slice(from, to int) Slice + func (b *ByteBuf) Wrap(data []byte) + func (b *ByteBuf) Write(p []byte) (int, error) + func (b *ByteBuf) WriteByte(v byte) error + func (b *ByteBuf) WriteByteBuf(from *ByteBuf) error + func (b *ByteBuf) WriteInt(v int) (n int, err error) + func (b *ByteBuf) WriteInt64(v int64) (n int, err error) + func (b *ByteBuf) WriteString(v string) error + func (b *ByteBuf) WriteUInt16(v uint16) (n int, err error) + func (b *ByteBuf) WriteUInt32(v uint32) (n int, err error) + func (b *ByteBuf) WriteUInt64(v uint64) (n int, err error) + func (b *ByteBuf) WriteUint64(v uint64) (n int, err error) + func (b *ByteBuf) Writeable() int + func (b *ByteBuf) WrittenDataAfterMark() Slice + type Pool interface + Alloc func(int) []byte + Free func([]byte) + type Slice struct + func (s Slice) Data() []byte + type SyncPool struct + func NewSyncPool(minSize, maxSize, factor int) *SyncPool + func (pool *SyncPool) Alloc(size int) []byte + func (pool *SyncPool) Free(mem []byte)