Documentation ¶
Overview ¶
package mio (short for memory input/output) implements the layered io stack of brig. This includes currently three major parts:
- encrypt - Encryption and Decryption layer with seeking support. - compress - Seekable Compression and Decompression with exchangable algorithms. - overlay - In-Memory write overlay over a io.Reader with seek support.
This package itself contains utils that stack those on top of each of other in an already usable fashion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInStream ¶
NewInStream creates a new stream that pipes data into ipfs. The data is read from `r`, encrypted with `key` and compressed with `algo`.
Types ¶
type Stream ¶
func LimitStream ¶
LimitStream is like io.LimitReader, but works for mio.Stream. It will not allow reading/seeking after the specified size.
func NewOutStream ¶
func NewOutStream(r io.ReadSeeker, key []byte) (Stream, error)
NewOutStream creates an OutStream piping data from brig to the outside. `key` is used to decrypt the data. The compression algorithm is read from the stream header.