Documentation
¶
Overview ¶
Package par2test builds PAR2 2.0 metadata packets and index files for tests. It is for tests only: production code must not import it.
Packets carry correct packet MD5s. File IDs are derived the way PAR2 clients do (MD5 of the 16k hash, the length and the name); recovery set IDs are the MD5 of the Main packet body. No recovery slices are written.
Index ¶
- func FileDescBody(id par2.ID, name string, data []byte) []byte
- func FileID(name string, data []byte) par2.ID
- func IFSCBody(id par2.ID, sliceSize int64, data []byte) []byte
- func Index(sliceSize int64, files []File) ([]byte, par2.ID)
- func MainBody(sliceSize int64, ids []par2.ID) []byte
- func Packet(setID par2.ID, typ string, body []byte) []byte
- func UniNameBody(id par2.ID, name string) []byte
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileDescBody ¶
FileDescBody returns a File Description packet body.
func Index ¶
Index returns a PAR2 index file describing files with the given slice size (a positive multiple of 4), and its recovery set ID.
Types ¶
Click to show internal directories.
Click to hide internal directories.