pack

package
v0.0.0-...-03d0fae Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 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 HashableFile

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

HashableFile hash file

func OpenHashableFile

func OpenHashableFile(name string) (*HashableFile, error)

OpenHashableFile todo

func (*HashableFile) Close

func (f *HashableFile) Close() error

Close close file

func (*HashableFile) Hashsum

func (f *HashableFile) Hashsum(name string)

Hashsum hash sum

func (*HashableFile) Write

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

Write a file

func (*HashableFile) WriteString

func (f *HashableFile) 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