yenc

package module
v0.0.0-...-9e354c9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: MIT Imports: 10 Imported by: 0

README

yEnc

Golang yEnc decoder library with multi core support

Install

go get github.com/GJRTimmer/yenc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content []byte

Content .

func (Content) Bytes

func (c Content) Bytes() []byte

Bytes of content

type Data

type Data struct {
	Content Content
	Meta    *Meta
	Error   error
}

Data structure which holds yEnc data to be decoded by Decoder

func DecodeData

func DecodeData(d *Data) *Data

DecodeData *yenc.Data

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder for multi core yEnc decoding

func NewDecoder

func NewDecoder(maxCores int, workQueue chan *Data) (*Decoder, error)

NewDecoder creates a new Decoder

func (*Decoder) Collect

func (d *Decoder) Collect() chan *Data

Collect completed work

func (*Decoder) Start

func (d *Decoder) Start()

Start Decoder

func (*Decoder) Stop

func (d *Decoder) Stop()

Stop Decoder

type Meta

type Meta struct {
	Header *yBegin
	Part   *yPart
	Footer *yEnd
	// contains filtered or unexported fields
}

Meta of yEnc

func Decode

func Decode(b []byte) ([]byte, *Meta, error)

Decode yEnc data

type Size

type Size uint64

Size .

func (Size) String

func (s Size) String() string

Jump to

Keyboard shortcuts

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