Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 2.37 KB

README.md

File metadata and controls

64 lines (47 loc) · 2.37 KB

Code Climate Maintainability 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"
)

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

License

Apache License, Version 2.0