Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it efficient to store embedded resources in C# solution in a *.zip archive?

Heading ##I'd like to add a few dictionaries as an embedded resources into my C# solution (*.dic and *.aff files).

Each dictionary is a simple text file inside, so it can be compressed very well.

Is it efficient to store these dictionaries in a *.zip archive, include archive as an embedded resource into my solution and then extract my dictionaries from archive in runtime? Or are embedded resources compressed by default in an assembly file?

By efficient I meant that the install size would be smaller, and runtime slowdown would not be critical.

like image 340
Artem Kachanovskyi Avatar asked Oct 15 '25 15:10

Artem Kachanovskyi


1 Answers

Yes.

We can see this by adding a 1MB xml file as an embedded resource. The resulting dll will increase by approx 1MB. If we on the other hand zip it before hand, the resulting dll can increase as little a few kb depending on the compression level of the content.

like image 52
Esben Skov Pedersen Avatar answered Oct 17 '25 04:10

Esben Skov Pedersen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!