io

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitsFromBinStrReader

func BitsFromBinStrReader(ctx context.Context, r io.Reader) ([]types.Bit, error)

func BitsFromBinStrReaderWithCap

func BitsFromBinStrReaderWithCap(ctx context.Context, r io.Reader, maxBits int) ([]types.Bit, error)

func BitsFromByteFile

func BitsFromByteFile(ctx context.Context, filename string) func() ([]types.Bit, error)

func BitsFromByteReader

func BitsFromByteReader(ctx context.Context, r io.Reader) ([]types.Bit, error)

func BitsFromByteReaderWithCap

func BitsFromByteReaderWithCap(ctx context.Context, r io.Reader, maxBits int) ([]types.Bit, error)

func BitsFromByteStdin

func BitsFromByteStdin(ctx context.Context) ([]types.Bit, error)

func BitsFromReader

func BitsFromReader(ctx context.Context, r io.Reader, opts ...opt) ([]types.Bit, error)

func BitsToByteWriter

func BitsToByteWriter(ctx context.Context, w io.Writer, bits []types.Bit) error

func BitsToString

func BitsToString(bits []types.Bit, opts ...Opt) string

Types

type Opt

type Opt func(c *b2sConfig)

func WithSep

func WithSep(s rune) Opt

func WithSepDistance

func WithSepDistance(d int) Opt

type ReaderWithSize

type ReaderWithSize interface {
	io.Reader

	// Size return the size in bytes of the reader content
	Size() int
}

func NewReaderWithSize

func NewReaderWithSize(r io.Reader, size int) ReaderWithSize

Jump to

Keyboard shortcuts

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