metainfo

package
v0.0.0-...-ba61289 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Length uint64
	MD5Sum []byte
	Path   []string
}

type InfoDict

type InfoDict struct {
	PieceLength uint64
	Pieces      [][]byte
	Private     bool

	Files []FileInfo
}

type Metainfo

type Metainfo struct {
	Info     InfoDict
	InfoHash []byte

	Announce     string
	AnnounceList [][]string

	CreatedBy    string
	CreationDate time.Time

	Comment string

	Encoding string
}

func Decode

func Decode(data []byte) (*Metainfo, error)

func (*Metainfo) TotalLength

func (m *Metainfo) TotalLength() uint64

Jump to

Keyboard shortcuts

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