bloat

package
v0.0.0-...-d0f0753 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZipMethodStore   uint16 = 0
	ZipMethodDeflate uint16 = 8
	ZipMethodBZIP2   uint16 = 12
	ZipMethodLZMA    uint16 = 14
	ZipMethodLZMA2   uint16 = 33
	ZipMethodZSTD    uint16 = 93
	ZipMethodXZ      uint16 = 95
	ZipMethodJPEG    uint16 = 96
	ZipMethodWavPack uint16 = 97
	ZipMethodPPMd    uint16 = 98
	ZipMethodAES     uint16 = 99
)

CompressionMethod value

Variables

View Source
var (
	ErrDangerousPathAccessDenied = errors.New("dangerous path access denied")
)
View Source
var (
	ErrUnsupportArchiveFormat = errors.New("unsupport archive format")
)

Functions

func JoinSanitizePath

func JoinSanitizePath(parent string, elem ...string) (string, error)

func JoinSanitizePathSlow

func JoinSanitizePathSlow(parent string, elem ...string) (string, error)

func MakeFlattened

func MakeFlattened(src, dest string) error
func Symlink(oldname string, newname string) error

Types

type Extractor

type Extractor interface {
	Extract(cwd string, opt *ExtractorOptions) error
	Close() error
}

func NewExtractor

func NewExtractor() (Extractor, error)

type ExtractorOptions

type ExtractorOptions struct {
	OnNewFile    func(filename string) bool
	OnProgress   func(total, current uint64) bool
	PasswordText string
}

type Format

type Format int
const (
	NONE Format = iota
	EPUB
	ZIP
	TAR
	RAR
	GZ
	BZIP2
	ZSTD
	SEVENZIP
	XZ
	EOT
	CRX
	DEB
	LZ
	RPM
	CAB
	MSI
	DMG
	XAR
	WIM
	Z
	BROTLI
	EXE
)

func ArchiveFormat

func ArchiveFormat(b []byte) Format

Jump to

Keyboard shortcuts

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