model

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeadVersionEndian = binary.BigEndian

Functions

func CheckPackage

func CheckPackage(inFile string, encrypt *Encrypt) error

func Compress

func Compress(inFile, outFile string, compressModel HeadVersion, encrypt *Encrypt) error

func Register

func Register(m Model)

func Uncompress

func Uncompress(inFile, outFile string, encrypt *Encrypt) error

func WriteVersion

func WriteVersion(i io.Writer, version HeadVersion) error

Types

type Encrypt

type Encrypt struct {
	Key []byte
}

type HeadVersion

type HeadVersion struct {
	Protocol byte
	Version  uint8
}

func ParseVersion

func ParseVersion(i *bufio.Reader) (HeadVersion, error)

func (HeadVersion) Len

func (v HeadVersion) Len() int

func (HeadVersion) String

func (v HeadVersion) String() string

type Model

type Model interface {
	Version() HeadVersion
	Compress(in string, out *os.File, encrypt *Encrypt) error
	Uncompress(in *bufio.Reader, out string, encrypt *Encrypt) error
	CheckPackage(in *bufio.Reader, encrypt *Encrypt) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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