util

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxAllowedSectionSize uint = 32 << 20 // 32MiB

MaxAllowedSectionSize dictates the maximum number of bytes that a CARv1 header or section is allowed to occupy without causing a decode to error. This cannot be supplied as an option, only adjusted as a global. You should use v2#NewReader instead since it allows for options to be passed in.

Functions

func LdRead

func LdRead(r *bufio.Reader) ([]byte, error)

func LdSize

func LdSize(d ...[]byte) uint64

func LdWrite

func LdWrite(w io.Writer, d ...[]byte) error

func ReadCid deprecated

func ReadCid(buf []byte) (cid.Cid, int, error)

Deprecated: ReadCid shouldn't be used directly, use CidFromReader from go-cid

func ReadNode

func ReadNode(br *bufio.Reader) (cid.Cid, []byte, error)

Types

type BytesReader

type BytesReader interface {
	io.Reader
	io.ByteReader
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL