Skip to content

Go package to natively decompress and unarchive tar.gz, tar.bzip2, tar.xz, zip and tar files.

License

Notifications You must be signed in to change notification settings

c4milo/unpackit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1d3c888 · Oct 4, 2022

History

72 Commits
May 13, 2017
Jul 4, 2017
May 13, 2017
Mar 23, 2017
May 19, 2017
Sep 9, 2014
Oct 4, 2022
Oct 4, 2022
Mar 16, 2021
Oct 4, 2022
Oct 4, 2022

Repository files navigation

UnpackIt

GoDoc Build Status

This Go library allows you to easily unpack the following files using magic numbers:

  • tar.gz
  • tar.bzip2
  • tar.xz
  • zip
  • tar

Usage

Unpack a file:

    file, _ := os.Open(test.filepath)
    err := unpackit.Unpack(file, tempDir)

Unpack a stream (such as a http.Response):

    res, err := http.Get(url)
    err := unpackit.Unpack(res.Body, tempDir)

About

Go package to natively decompress and unarchive tar.gz, tar.bzip2, tar.xz, zip and tar files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages