archive

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package archive extracts downloaded manifest assets. J1 supports zip (archive/zip, no external dependency); the remaining CPT-05 formats (7z, MSI, InnoSetup, NSIS) are J2 scope, delegated to 7z.exe/dark.exe per EXT-06.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractGzip

func ExtractGzip(src, destPath string) error

ExtractGzip decompresses a single-file gzip (not a tar) to destPath.

func ExtractTar

func ExtractTar(src, destDir, stripDir string) error

ExtractTar extracts an uncompressed tar archive into destDir.

func ExtractTarGz

func ExtractTarGz(src, destDir, stripDir string) error

ExtractTarGz extracts a gzip-compressed tar archive into destDir, with the same extract_dir semantics as ExtractZip.

func ExtractZip

func ExtractZip(src, destDir, stripDir string) error

ExtractZip extracts src into destDir. If stripDir is non-empty, only entries under that top-level directory are extracted, with the prefix removed -- this is extract_dir's "hoist a nested folder's contents up to the version root" behavior.

func IsUnsupportedCompression

func IsUnsupportedCompression(err error) bool

IsUnsupportedCompression reports whether err is Go's archive/zip rejecting a compression method it doesn't implement (e.g. Deflate64, used by a minority of real-world zips) -- distinct from a corrupt archive or an I/O error, so a caller can fall back to delegating the whole extraction to 7z.exe instead, which handles those methods.

Types

This section is empty.

Jump to

Keyboard shortcuts

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