1.1.11 • Published 1 year ago

@jeffy-g/unzip v1.1.11

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

GitHub

@jeffy-g/unzip

use fflate unzip feature

CLI usage

command line name - ffunzip

  • all zip file extract to <output directory>
    If you need a detailed log, please specify the -v option.

    $ ffunzip [-v] [-d <output directory>] <zip file> <zip file> <zip file> ...
  • NOTE: if -d omitted then output directory to ./output

API

// DEVNOTE: 2024/01/01 - "colors" available
const unzipWithCallback = require("@jeffy-g/unzip");

/** @type {(path: TSimpleZipEntry) => void} */
const withCallback = e => {
  if (e.state === "ignore" || e.type === "Folder") {
    // do nothing
  } else {
    const state = e.state;
    const color = state === "pending" ? "cyan": "green";
    console.log(`${state} - ${
      e.path[color]}${state !== "write" ? `, size: ${e.size?.toLocaleString().blue}`: ""
    }`);
  }
};

unzipWithCallback("[zipPath]", "[output directory]", withCallback);

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

1.1.11

1 year ago

1.1.10

1 year ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.0

2 years ago