Last active
December 7, 2015 11:11
-
-
Save ukyo/a5f7454fe0ac4cfa278e to your computer and use it in GitHub Desktop.
unzip win10 edge vmware vm with node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var zlib = require('zlib'); | |
var start; | |
var end; | |
function unzipFile(name, start, end) { | |
var rs = fs.createReadStream('MsEdge.Win10.VMware.zip', {start: start, end: end}); | |
var inflateStream = zlib.createInflateRaw(); | |
var ws = fs.createWriteStream(name); | |
rs.pipe(inflateStream).pipe(ws); | |
} | |
start = 0x6E; | |
end = start + 0x013D7DF66C; | |
unzipFile('MsEdge-Win10-VMware-disk1.vmdk', start, end); | |
start = end + 0x48; | |
end = start + 0x7A; | |
unzipFile('MsEdge-Win10-VMware.mf', start, end); | |
start = end + 0x49; | |
end = start + 0x056E; | |
unzipFile('MsEdge-Win10-VMware.ovf', start, end); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment