mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-08-06 16:50:54 +00:00
version 3.0
This commit is contained in:
parent
20a97ae39f
commit
f7014075ec
86 changed files with 7587 additions and 238 deletions
23
legacy/js/worker_crc.js
Normal file
23
legacy/js/worker_crc.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* Rom Patcher JS v20200502 - Marc Robledo 2016-2020 - 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