unarchive

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package unarchive

Copied from https://raw.githubusercontent.com/c4milo/unpackit/master/unpackit.go

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unarchive

func Unarchive(reader io.Reader, destPath string) error

Unarchive unpacks a compressed stream. Magic numbers are used to determine what decompressor and/or unarchiver to use.

func Untar

func Untar(data io.Reader, destPath string) error

Untar unarchives a TAR archive and returns the final destination path or an error

func Unzip

func Unzip(r io.Reader, destPath string) error

Unzip unpacks a ZIP stream. When given a os.File reader it will get its size without reading the entire zip file in memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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