util

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 0

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