Documentation
¶
Index ¶
- Constants
- func DecodeHash(src string) (bytes []byte, err error)
- func DecodeVariableLengthInteger(raw []byte) (cnt int, cntSize int)
- func GetUint64FromReder(r io.Reader) (uint64, error)
- func RandomUint64() (uint64, error)
- func ReadVarBytes(r io.Reader, size uint32, maxAllowed uint32, fieldName string) ([]byte, error)
- func ReadVarInt(r io.Reader, size uint32) (uint64, error)
- func ReadVarString(r io.Reader, size uint32) (string, error)
- func ToHash256String(data []byte) string
- func ToHexString(data []byte) string
- func VarIntSerializeSize(val uint64) int
- func WriteVarBytes(w io.Writer, size uint32, bytes []byte) error
- func WriteVarInt(w io.Writer, size uint32, val uint64) error
- func WriteVarString(w io.Writer, size uint32, str string) error
- type BinaryFreeList
- func (b BinaryFreeList) BorrowFront8() (buf []byte)
- func (b BinaryFreeList) PutUint16(w io.Writer, byteOrder binary.ByteOrder, val uint16) error
- func (b BinaryFreeList) PutUint32(w io.Writer, byteOrder binary.ByteOrder, val uint32) error
- func (b BinaryFreeList) PutUint64(w io.Writer, byteOrder binary.ByteOrder, val uint64) error
- func (b BinaryFreeList) PutUint8(w io.Writer, val uint8) error
- func (b BinaryFreeList) Return(buf []byte)
- func (b BinaryFreeList) Uint16(r io.Reader, byteOrder binary.ByteOrder) (uint16, error)
- func (b BinaryFreeList) Uint32(r io.Reader, byteOrder binary.ByteOrder) (uint32, error)
- func (b BinaryFreeList) Uint64(r io.Reader, byteOrder binary.ByteOrder) (uint64, error)
- func (b BinaryFreeList) Uint8(r io.Reader) (uint8, error)
- type Hash
- type HashFunc
- type LookupFunc
Constants ¶
View Source
const ( IoMaxSize = 1024 MaxSize = 0x02000000 )
View Source
const ( HashSize = 32 MaxHashStringSize = HashSize * 2 )
Variables ¶
This section is empty.
Functions ¶
func DecodeHash ¶
func RandomUint64 ¶
func ReadVarBytes ¶
func ToHash256String ¶
func ToHexString ¶
func VarIntSerializeSize ¶
Types ¶
type BinaryFreeList ¶
type BinaryFreeList chan []byte
var BinarySerializer BinaryFreeList = make(chan []byte, IoMaxSize)
func (BinaryFreeList) BorrowFront8 ¶
func (b BinaryFreeList) BorrowFront8() (buf []byte)
func (BinaryFreeList) Return ¶
func (b BinaryFreeList) Return(buf []byte)
Return puts the provided byte slice back on the free list. The buffer MUST have been obtained via the Borrow function and therefore have a cap of 8.
type Hash ¶
func BytesToHash ¶
func GetHashFromStr ¶
func HashFromString ¶
func (*Hash) GetCloneBytes ¶
Click to show internal directories.
Click to hide internal directories.