pack

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Store   uint16 = 0   // no compression
	Deflate uint16 = 8   // DEFLATE compressed
	BZIP2   uint16 = 12  // bzip2
	LZMA    uint16 = 14  //LZMA
	ZSTD    uint16 = 93  //see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT.
	XZ      uint16 = 95  //XZ
	BROTLI  uint16 = 121 // private
)

Compression methods.

View Source
const (
	RespondName = "bali_post_install.sh"
)

RespondName

View Source
const (
	TarISVTX = 01000
)

ISVTX todo

View Source
const (
	ZipISVTX = 0x200
)

Zip

Variables

This section is empty.

Functions

This section is empty.

Types

type HashFD added in v2.2.0

type HashFD struct {
	*os.File
	// contains filtered or unexported fields
}

HashFD hash file

func NewHashFD added in v2.2.0

func NewHashFD(name string) (*HashFD, error)

NewHashFD new hash fd

func (*HashFD) Close added in v2.2.0

func (fd *HashFD) Close() error

Close close file

func (*HashFD) Sum added in v2.2.0

func (f *HashFD) Sum(name string)

Sum hash sum

func (*HashFD) Write added in v2.2.0

func (f *HashFD) Write(p []byte) (int, error)

Write a file

func (*HashFD) WriteString added in v2.2.0

func (fd *HashFD) WriteString(s string) (int, error)

WriteString write string

type Packer

type Packer interface {
	Close() error
	AddFileEx(src, nameInArchive string, exerights bool) error
	AddFile(src, nameInArchive string) error
	AddTargetLink(nameInArchive, linkName string) error
}

Packer todo

type PortableExecutablePacker

type PortableExecutablePacker struct {
}

PortableExecutablePacker PE WIP

type RespondWriter

type RespondWriter struct {
	Path string
	// contains filtered or unexported fields
}

RespondWriter todo

func (*RespondWriter) AddProfile

func (rw *RespondWriter) AddProfile(relname string) error

AddProfile todo

func (*RespondWriter) AddTarget

func (rw *RespondWriter) AddTarget(relname string) error

AddTarget todo

func (*RespondWriter) Close

func (rw *RespondWriter) Close() error

Close todo

func (*RespondWriter) Initialize

func (rw *RespondWriter) Initialize() error

Initialize todo

func (*RespondWriter) WriteBase

func (rw *RespondWriter) WriteBase() error

WriteBase todo

type TargzPacker

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

TargzPacker todo

func NewTargzPacker

func NewTargzPacker(w io.Writer) *TargzPacker

NewTargzPacker todo

func (*TargzPacker) AddFile

func (pk *TargzPacker) AddFile(src, nameInArchive string) error

AddFile todo

func (*TargzPacker) AddFileEx

func (pk *TargzPacker) AddFileEx(src, nameInArchive string, exerights bool) error

AddFileEx todo

func (pk *TargzPacker) AddTargetLink(nameInArchive, linkName string) error

AddTargetLink todo

func (*TargzPacker) Close

func (pk *TargzPacker) Close() error

Close todo

type ZipPacker

type ZipPacker struct {
	FileMethod uint16 // zip filemethod
	// contains filtered or unexported fields
}

ZipPacker todo

func NewZipPacker

func NewZipPacker(w io.Writer) *ZipPacker

NewZipPacker todo

func NewZipPackerEx

func NewZipPackerEx(w io.Writer, method uint16) *ZipPacker

NewZipPackerEx todo

func (*ZipPacker) AddFile

func (zp *ZipPacker) AddFile(src, nameInArchive string) error

AddFile file to zip packer

func (*ZipPacker) AddFileEx

func (zp *ZipPacker) AddFileEx(src, nameInArchive string, exerights bool) error

AddFileEx todo

func (zp *ZipPacker) AddTargetLink(nameInArchive, linkName string) error

AddTargetLink create zip symlink

func (*ZipPacker) Close

func (zp *ZipPacker) Close() error

Close todo

func (*ZipPacker) SetComment

func (zp *ZipPacker) SetComment(comment string) error

Jump to

Keyboard shortcuts

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