magic

package
v7.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decompress

func Decompress(r io.Reader, ctype CompressionType) (io.Reader, error)

func DetectCompressed

func DetectCompressed(f *os.File) (FileType, CompressionType)

Types

type CompressionType

type CompressionType int
const (
	CompressedNone CompressionType = iota
	CompressedGzip
	CompressedXz
)

type FileType

type FileType int
const (
	FileTypeUnknown FileType = iota
	FileTypeRPM
	FileTypeDEB
	FileTypePGP
	FileTypeJAR
	FileTypePKCS7
	FileTypePECOFF
	FileTypeMSI
	FileTypeCAB
	FileTypeAppManifest
	FileTypeCAT
	FileTypeStarman
	FileTypeAPPX
	FileTypeVSIX
	FileTypeXAP
	FileTypeAPK
)

func Detect

func Detect(r io.Reader) FileType

Detect a handful of package and signature file types based on the first few bytes of the file contents.

Jump to

Keyboard shortcuts

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