LibZ icon indicating copy to clipboard operation
LibZ copied to clipboard

Extract embedded assemblies

Open Giorgi opened this issue 8 years ago • 5 comments

I have an app which is built with LibZ. Is there an easy way to extract embedded assemblies to disk?

Giorgi avatar Dec 30 '16 19:12 Giorgi

"ILSpy / Resources / Save" then (usually) DeflateStream.

MiloszKrajewski avatar Jan 06 '17 10:01 MiloszKrajewski

Yep, I guessed that too but I have many assemblies which have many other embedded assemblies and I was looking for an automated way to do it but looks like there isn't built in support for it.

Giorgi avatar Jan 06 '17 10:01 Giorgi

I am using inject-dll to inject a managed dll into a managed console.exe

I want to extract the embeded dll resources from the console.exe application. I used dotpeek tool and saved the resources as .lz4 files When I tried to decompress using lz4 with the command lz4 -d resource.z resource.dll An exception error is fired:

Error 44 : Unrecognized header : file cannot be decoded

What i missed to get the original embeded dll files

moh-hassan avatar Oct 15 '18 13:10 moh-hassan

It is not LZ4, it is just DeflateStream.

MiloszKrajewski avatar Oct 15 '18 16:10 MiloszKrajewski

@MiloszKrajewski , Thank you very much. yes, it's DeflateStream. :) I checked the extracted files and it's typical the same as original dll with the same identity and size.

moh-hassan avatar Oct 15 '18 17:10 moh-hassan