unwxvpkg
v0.0.3
Published
unpack wx[av]pkg
Downloads
12
Readme
unwxvpkg
Unpack *.wx[va]pkg files.
Installation
Using npm:
$ npm i -g unwxvpkg
Using yarn:
$ yarn add -g unwxvpkg
Usage
unwxapkg <your *.wx[va]pkg file> [output folder]
unwxapkg core.wxvpkg
// or unwxvpkg core.wxvpkg
unwxapkg
is same as unwxvpkg
.
Node.js
const Wxapkg = require('unwxvpkg');
// import * as Wxapkg from 'unwxvpkg';
const fs = require('fs');
const path = require('path');
const file = fs.readFileSync('your.wxvpkg');
const wxapkg = new Wxapkg(file);
const files = wxapkg.decode();
files.forEach((f) => {
// custom handle file writing
fs.writeFileSync(path.join(process.cwd(), f.name), f.chunk, 'binary');
});