yenc

package
v0.0.0-...-4deb2f9 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: BSD-3-Clause Imports: 6 Imported by: 2

Documentation

Overview

Package yenc gives a decoding interface for yEnc encoded binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodeError

type DecodeError string

func (DecodeError) Error

func (d DecodeError) Error() string

type Part

type Part struct {
	Filename string
	Begin    int64
	Size     int64
	NumParts int
	Number   int
	// contains filtered or unexported fields
}

Part holds the information contained in a parsed yEnc header. It also implements the read interface for easy decoding. Normally, you will need to read the Filename to find out which file to open and Begin to know where to seek before writing.

func NewPart

func NewPart(r io.Reader) (*Part, error)

NewPart finds and parses the yEnc header in the reader and returns a part to use for further decoding.

func (*Part) Read

func (y *Part) Read(b []byte) (n int, err error)

Read will read the content of a yEnc part, obeying the normal read rules

Jump to

Keyboard shortcuts

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