https://github.com/markthree/nzip
Intelligent fast compression and decompression cli | 智能化快速解压和压缩 cli
https://github.com/markthree/nzip
cli deno intellect script tar zip
Last synced: 8 months ago
JSON representation
Intelligent fast compression and decompression cli | 智能化快速解压和压缩 cli
- Host: GitHub
- URL: https://github.com/markthree/nzip
- Owner: markthree
- License: mit
- Created: 2023-04-08T08:37:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T04:12:04.000Z (about 1 year ago)
- Last Synced: 2025-02-13T12:12:22.484Z (12 months ago)
- Topics: cli, deno, intellect, script, tar, zip
- Language: TypeScript
- Homepage: https://deno.land/x/nzip
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nzip
Intelligent fast compression and decompression `cli`
## Support
### cli
- Support for `tar` and `unzip`
- Ignores common caching of `nodejs`
- Support for [c12](https://github.com/unjs/c12) configuration (name: nzip)
### program
- Multi-file bundling
- Support for `tar` and `unzip`
## Usage
### Program
```ts
import { tar, untar, unzip, zip } from "https://deno.land/x/nzip/mod.ts";
// Compression
await tar(["/path/file1", "/path/file2"], "output.tar");
await zip(["/path/file1", "/path/file2"], "output.zip");
// Decompression
await untar("output.tar", "/path2/");
await unzip("output.tar", "/path2/");
```
### cli
#### Installation
```shell
deno install --allow-read --allow-write --allow-env --allow-sys --allow-run -rfn nzip https://deno.land/x/nzip/mod.ts
```
Of course, if you haven't installed `deno` before 👇
```shell
npx deno-npx install --allow-read --allow-write --allow-env --allow-sys --allow-run -rfn nzip https://deno.land/x/nzip/mod.ts
```
#### Zip
```shell
nzip # # In your project
```
#### Tar
```shell
nzip -t tar # In your project
```
#### Configuration File
```ts
// nzip.config.ts
export default {
// Name of the file after successful compression, default is 'default'
name: "demo",
// Custom rules to skip
skip: [/script/],
};
```
```shell
nzip # Merges configuration automatically
```
#### Decompression
```shell
nzip de
```
## Refs
- `tar` is supported by the `deno` standard library
[archive](https://deno.land/std/archive/mod.ts)
- `zip` is supported by
[gildas-lormeau/zip.js](https://github.com/gildas-lormeau/zip.js), so it is
particularly fast
## License
Made with [markthree](https://github.com/markthree) Published under
[MIT License](./LICENSE).