mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
patch creation can now create IPS patches if offsets are below format limit, rearranged files internally
This commit is contained in:
parent
e5bc46d725
commit
8146f4860a
27 changed files with 190 additions and 171 deletions
23
js/worker_crc.js
Normal file
23
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