Supported formats • Usage example • CI Status • License
npck
is a Go package for unpacking various types of archives.
- tar (
.tar
) - Gzip (
.gz
,.tgz
,.tar.gz
) - bzip2 (
.bz2
,.tbz2
,.tar.bz2
) - xz (
.xz
,.txz
,.tar.xz
) - Zstandart (
.zst
,.tzst
,.tar.zst
) - LZ4 (
.lz4
,.tlz4
,.tar.lz4
) - ZIP (
.zip
)
package main
import (
"fmt"
"github.com/essentialkaos/npck"
)
func main() {
file := "file.tar.gz"
err := npck.Unpack(file, "/home/john")
if err != nil {
fmt.Printf("Error: Can't unpack %s: %v\n", file, err)
return
}
fmt.Printf("File %s successfully unpacked!\n", file)
}
Branch | Status |
---|---|
master |
|
develop |