Note that there are some explanatory texts on larger screens.

plurals
  1. POEmbed OpenXML SDK Files In .NET Executable
    text
    copied!<p>The Microsoft OpenXML SDK version 2.0 ships with a ~5111 KiB .NET assembly (DLL), and a ~14436 KiB uncompressed XML file. <strike>Both of these are required to successfully use the SDK.</strike> (<strong>Important update:</strong> Only the DLL file is required; the XML is just API documentation for the programmer!!)</p> <p>I've written a program using the SDK that works and I'm satisfied with it. However, I compressed the OpenXML SDK data (DLL and XML) using LZMA2, and the result is only 1287 KiB. The savings is 18260 KiB, which can take at least a few seconds, up to several minutes, to transfer over an average WAN link.</p> <p>I downloaded the LZMA SDK from <a href="http://www.7-zip.org/sdk.html" rel="nofollow">7-zip.org</a> which implements LZMA compression and decompression in about 45 KiB of compiled MSIL (as compiled by .NET Framework 4.0).</p> <p>My goal is to compress the resources (using something like 7-Zip), store them in the built assembly (.exe), then decompress them and load them. I know how to use the 7-Zip SDK to do decompression. I have two problems thus:</p> <ol> <li><p>How do I load the OpenXML SDK assembly (.dll) into the running .NET process without writing it to disk? Assume I have a byte[] of the uncompressed bytes of the DLL; I'll take care of resource packing into the executable by myself.</p></li> <li><p>How do I tell the assembly to load the OpenXML schema (DocumentFormat.OpenXml.xml) from memory without writing it to disk? Assume I have a byte[] or string containing the uncompressed XML. Again, I will take care of decompression and resource packing myself.</p></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload