8000 GitHub - jingc1413/npck: Go package for unpacking various types of archives
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jingc1413/npck

 
 

Repository files navigation

GoReportCard Code Climate Maintainability Codebeat badge
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

About

Go package for unpacking various types of archives

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.6%
  • Makefile 4.4%
0