Versions in this module Expand all Collapse all v0 v0.1.25 Jan 22, 2024 v0.1.24 Jan 22, 2024 v0.1.23 Jan 22, 2024 v0.1.22 Jan 22, 2024 v0.1.21 Jan 19, 2024 v0.1.20 Jan 13, 2024 v0.1.19 Jan 13, 2024 Changes in this version + var BytesPool = bytespool.NewCapacityPools(32, math.MaxInt32) + var ErrInvalidSeekPos = errors.New("invalid seek position") + var ErrLimitReached = errors.New("i/o limit reached") + func ReadFrom[T io.Reader](bs *ByteStream, reader T) (int64, error) + func SizeofBool() int + func SizeofByte() int + func SizeofBytes(v []byte) int + func SizeofBytes128() int + func SizeofBytes16() int + func SizeofBytes160() int + func SizeofBytes256() int + func SizeofBytes32() int + func SizeofBytes512() int + func SizeofBytes64() int + func SizeofDouble() int + func SizeofFloat() int + func SizeofInt16() int + func SizeofInt32() int + func SizeofInt64() int + func SizeofInt8() int + func SizeofString(v string) int + func SizeofUint16() int + func SizeofUint32() int + func SizeofUint64() int + func SizeofUint8() int + func SizeofUvarint(v uint64) int + func SizeofVarint(v int64) int + type ByteStream struct + func NewBigEndianStream(p []byte) ByteStream + func NewByteStream(p []byte, endian binary.ByteOrder) ByteStream + func NewLittleEndianStream(p []byte) ByteStream + func (s *ByteStream) BuffRead() []byte + func (s *ByteStream) BuffUnread() []byte + func (s *ByteStream) BuffUnwritten() []byte + func (s *ByteStream) BuffWritten() []byte + func (s *ByteStream) BytesRead() int + func (s *ByteStream) BytesUnread() int + func (s *ByteStream) BytesUnwritten() int + func (s *ByteStream) BytesWritten() int + func (s *ByteStream) ReadBool() (bool, error) + func (s *ByteStream) ReadByte() (byte, error) + func (s *ByteStream) ReadBytes() ([]byte, error) + func (s *ByteStream) ReadBytes128() ([128]byte, error) + func (s *ByteStream) ReadBytes16() ([16]byte, error) + func (s *ByteStream) ReadBytes160() ([160]byte, error) + func (s *ByteStream) ReadBytes256() ([256]byte, error) + func (s *ByteStream) ReadBytes32() ([32]byte, error) + func (s *ByteStream) ReadBytes512() ([512]byte, error) + func (s *ByteStream) ReadBytes64() ([64]byte, error) + func (s *ByteStream) ReadBytesRef() ([]byte, error) + func (s *ByteStream) ReadDouble() (float64, error) + func (s *ByteStream) ReadFloat() (float32, error) + func (s *ByteStream) ReadFrom(reader io.Reader) (int64, error) + func (s *ByteStream) ReadInt16() (int16, error) + func (s *ByteStream) ReadInt32() (int32, error) + func (s *ByteStream) ReadInt64() (int64, error) + func (s *ByteStream) ReadInt8() (int8, error) + func (s *ByteStream) ReadString() (string, error) + func (s *ByteStream) ReadStringRef() (string, error) + func (s *ByteStream) ReadUint16() (uint16, error) + func (s *ByteStream) ReadUint32() (uint32, error) + func (s *ByteStream) ReadUint64() (uint64, error) + func (s *ByteStream) ReadUint8() (uint8, error) + func (s *ByteStream) ReadUvarint() (uint64, error) + func (s *ByteStream) ReadVarint() (int64, error) + func (s *ByteStream) SeekReadPos(p int) error + func (s *ByteStream) SeekWritePos(p int) error + func (s *ByteStream) WriteBool(v bool) error + func (s *ByteStream) WriteByte(v byte) error + func (s *ByteStream) WriteBytes(v []byte) error + func (s *ByteStream) WriteBytes128(v []byte) error + func (s *ByteStream) WriteBytes16(v []byte) error + func (s *ByteStream) WriteBytes160(v []byte) error + func (s *ByteStream) WriteBytes256(v []byte) error + func (s *ByteStream) WriteBytes32(v []byte) error + func (s *ByteStream) WriteBytes512(v []byte) error + func (s *ByteStream) WriteBytes64(v []byte) error + func (s *ByteStream) WriteDouble(v float64) error + func (s *ByteStream) WriteFloat(v float32) error + func (s *ByteStream) WriteInt16(v int16) error + func (s *ByteStream) WriteInt32(v int32) error + func (s *ByteStream) WriteInt64(v int64) error + func (s *ByteStream) WriteInt8(v int8) error + func (s *ByteStream) WriteString(v string) error + func (s *ByteStream) WriteTo(writer io.Writer) (int64, error) + func (s *ByteStream) WriteUint16(v uint16) error + func (s *ByteStream) WriteUint32(v uint32) error + func (s *ByteStream) WriteUint64(v uint64) error + func (s *ByteStream) WriteUint8(v uint8) error + func (s *ByteStream) WriteUvarint(v uint64) error + func (s *ByteStream) WriteVarint(v int64) error + type BytesWriter struct + Bytes []byte + N int + func NewBytesWriter(bs []byte) *BytesWriter + func (l *BytesWriter) Write(p []byte) (int, error) + type LimitWriter struct + Limit int + N int + W io.Writer + func NewLimitWriter(w io.Writer, n int) *LimitWriter + func (l *LimitWriter) Write(p []byte) (int, error) + type RecycleBytes struct + func MakeNonRecycleBytes(bytes []byte) RecycleBytes + func MakeRecycleBytes(bytes []byte) RecycleBytes + func SliceRecycleBytes(bytes RecycleBytes, low, high int) RecycleBytes + func (b RecycleBytes) Data() []byte + func (b RecycleBytes) Recyclable() bool + func (b RecycleBytes) Release()