I recently switched to NSIS based installer for my electron application. It works great! When I build the installer, one of the artifacts created is a blockmap
file (MyApplicationName.exe.blockmap
). I am curious to know the purpose served by this file. I would appreciate if someone can explain this. I searched for nsis blockmap
but couldn't find anything that would explain this.
A quick web search:
The package block map file is an XML document that contains a list of the app鈥檚 files along with indexes and cryptographic hashes for each block of data that is stored in the package.
Taken from App Package Blockmap for Universal Windows Platform (UWP) Apps
If you use automatic updates, I believe the blockmap file is used for partial / differential updates to your application, to shrink the update payload size.
Thanks @gknapp. I don't think it's an XML document. In my case it is a binary file.
This file is used for delta updates (#2217).
In my case it is a binary file.
it is gzipped json.
@develar Are blockmap updates currently being used for macOS and Windows? Do I have to do anything special to enable it?
How are these blockmaps integrated with signing though. Since signing creates a new .exe. Will the blockmap become invalid ?
@develar, the JSON contans an array of base64
encoded strings and an array of int
s. I assume the int
s are the size of the block being referenced and that the base64
is some type of block hash. But the base64 is 24 base64 chars long which would decode to 18 bytes. An md5
hash is 16 bytes, and a sha1
hash is 20 bytes.
So if it is a hash, what hash algorithm does it use?
Edit: corrected mention of @develar
Most helpful comment
A quick web search:
Taken from App Package Blockmap for Universal Windows Platform (UWP) Apps
If you use automatic updates, I believe the blockmap file is used for partial / differential updates to your application, to shrink the update payload size.