Skip to content

Codacy Coverage Status GitHub Actions CI Status GitHub Actions CodeQL Status

Supported formatsUsage exampleCI StatusLicense


npck is a Go package for unpacking various types of archives.

Supported formats

  • 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)

Usage example

package main

import (
  "fmt"
  "github.com/essentialkaos/npck/v2"
)

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)
}

CI Status

Branch Status
master CI
develop CI

Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0

About

Go package for unpacking various types of archives

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages