https://github.com/essentialkaos/npck
Go package for unpacking various types of archives
https://github.com/essentialkaos/npck
golang-package gzip lz4 zip zstandard
Last synced: about 2 months ago
JSON representation
Go package for unpacking various types of archives
- Host: GitHub
- URL: https://github.com/essentialkaos/npck
- Owner: essentialkaos
- License: apache-2.0
- Created: 2023-01-04T14:17:49.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-03-23T03:04:21.000Z (3 months ago)
- Last Synced: 2026-05-04T19:06:26.640Z (about 2 months ago)
- Topics: golang-package, gzip, lz4, zip, zstandard
- Language: Go
- Homepage: https://kaos.sh/g/npck.v2
- Size: 481 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
Supported formats • Usage example • CI Status • License
`npck` is a Go package for unpacking various types of archives.
### Supported formats
* [tar](https://en.wikipedia.org/wiki/Tar_(computing)) (`.tar`)
* [Gzip](https://www.gnu.org/software/gzip/) (`.gz`, `.tgz`, `.tar.gz`)
* [bzip2](http://sourceware.org/bzip2/) (`.bz2`, `.tbz2`, `.tar.bz2`)
* [xz](https://tukaani.org/xz/) (`.xz`, `.txz`, `.tar.xz`)
* [Zstandart](https://facebook.github.io/zstd/) (`.zst`, `.tzst`, `.tar.zst`)
* [LZ4](https://lz4.github.io/lz4/) (`.lz4`, `.tlz4`, `.tar.lz4`)
* [ZIP](https://en.wikipedia.org/wiki/ZIP_(file_format)) (`.zip`)
### Usage example
```go
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` | [](https://kaos.sh/w/npck/ci?query=branch:master) |
| `develop` | [](https://kaos.sh/w/npck/ci?query=branch:develop) |
### Contributing
Before contributing to this project please read our [Contributing Guidelines](https://github.com/essentialkaos/.github/blob/master/CONTRIBUTING.md).
### License
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)