GitPedia

Unpackit

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

From c4milo·Updated February 11, 2026·View on GitHub·

This Go library allows you to easily unpack the following files using magic numbers: The project is written primarily in Go, distributed under the Mozilla Public License 2.0 license, first published in 2014. Key topics include: bzip2, decompression-library, go, golang, gzip.

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:

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

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

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

Contributors

Showing top 5 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from c4milo/unpackit via the GitHub API.Last fetched: 6/25/2026