mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
added RUP/PPF/xdelta support, added webworkers for a huge performance boost, added localization, other small fixes
This commit is contained in:
parent
9d85db3baa
commit
e7d2bccc47
19 changed files with 3016 additions and 1750 deletions
23
worker_crc.js
Normal file
23
worker_crc.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Rom Patcher JS v20181018 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
|
||||
|
||||
self.importScripts(
|
||||
'./MarcFile.js',
|
||||
'./crc.js'
|
||||
);
|
||||
|
||||
|
||||
|
||||
self.onmessage = event => { // listen for messages from the main thread
|
||||
var sourceFile=new MarcFile(event.data.u8array);
|
||||
|
||||
self.postMessage(
|
||||
{
|
||||
crc32:crc32(sourceFile, event.data.startOffset),
|
||||
md5:md5(sourceFile, event.data.startOffset),
|
||||
u8array:event.data.u8array
|
||||
},
|
||||
[
|
||||
event.data.u8array.buffer
|
||||
]
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue