padreader

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0, MIT Imports: 4 Imported by: 26 modules, 50 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-padreader

Tools for mapping between bit-padded and not-bit-padded byte streams

License

Dual-licensed under MIT + Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(r io.Reader, readerTotalSize uint64) (io.Reader, abi.UnpaddedPieceSize)

New produces a reader that produces the provided reader's bytes with a suffix of NUL bytes.

func NewInflator

func NewInflator(r io.Reader, readerTotalSize uint64, targetSize abi.UnpaddedPieceSize) (io.Reader, error)

NewInflator wraps a reader so that it will return enough bytes to exactly fill the given PieceSize

func PaddedSize

func PaddedSize(size uint64) abi.UnpaddedPieceSize

PaddedSize is an unfortunately-misnamed method: it returns the `unpadded` (payload bearing) size of the smallest piece that could fit the provided `size` payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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