padreader

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 3

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, size uint64) (io.Reader, abi.UnpaddedPieceSize)

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

func PaddedSize

func PaddedSize(size uint64) abi.UnpaddedPieceSize

PaddedSize takes size to the next power of two and then returns the number of not-bit-padded bytes that would fit into a sector of that size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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