fr32

package
v1.26.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const PaddedFr32Chunk abi.PaddedPieceSize = 128

PaddedFr32Chunk is the size of a UnpaddedFr32Chunk chunk after fr32 padding

View Source
const UnpaddedFr32Chunk abi.UnpaddedPieceSize = 127

UnpaddedFr32Chunk is the minimum amount of data which can be fr32-padded Fr32 padding inserts two zero bits every 254 bits, so the minimum amount of data which can be padded is 254 bits. 127 bytes is the smallest multiple of 254 bits which has a whole number of bytes.

Variables

View Source
var MTTresh = uint64(512 << 10)

Functions

func BufSize

func BufSize(sz abi.PaddedPieceSize) int

func NewPadWriter

func NewPadWriter(dst io.Writer) io.WriteCloser

func NewUnpadReader

func NewUnpadReader(src io.Reader, sz abi.PaddedPieceSize) (io.Reader, error)

func NewUnpadReaderBuf

func NewUnpadReaderBuf(src io.Reader, sz abi.PaddedPieceSize, buf []byte) (io.Reader, error)

func Pad

func Pad(in, out []byte)

func Unpad

func Unpad(in []byte, out []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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