Documentation ¶
Index ¶
- Constants
- Variables
- func BufSize(sz abi.PaddedPieceSize) int
- func NewPadWriter(dst io.Writer) io.WriteCloser
- func NewUnpadReader(src io.Reader, sz abi.PaddedPieceSize) (io.Reader, error)
- func NewUnpadReaderBuf(src io.Reader, sz abi.PaddedPieceSize, buf []byte) (io.Reader, error)
- func Pad(in, out []byte)
- func PadSingle(in, out []byte)
- func Unpad(in []byte, out []byte)
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 NewUnpadReaderBuf ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.