Wednesday, December 03, 2008

ICSharpCode’s SharpZipLib’s Help File

In yesterday’s post, I described a cool Zip file Library from ICSharpCode and showed how you could use it within PowerShell. I noted it had a help file which would be of value when using this library. I spent some this morning playing with the Zip lib and wanted to see more details (i.e. from the help file).

However, when I started playing with the help file, I just got lots of blank pages and no content – like this:

image

It It took me a few minutes to work out that it was Windows “helping” me by not showing any content since the file had been obtained from the Internet! The file was downloaded by Firefox and FireFox (like IE) adds a NTFS stream to the file to indicate it had been downloaded from the Internet. Since the file had been downloaded, IE rendered nothing on security grounds. Thanks but…

Sysinternals to the rescue. I just used the Streams.exe utility to remove the added stream:

image

Once the additional data stream was removed, the help file worked great:

image

5 comments:

CFRandall said...

Very cool info! thanks for sharing it.

Binh Luong said...

Can you share your help file?
So I can download it.
Many thanks

Thomas Lee said...

Regarding Binh Luong's comment - the simple answer is no. The reason is that the help file is installed when you install the SharpZipLib - there's no need for me to share it. You should alreaday have it. As I point out, you need to use streams.exe to remove the extra stream and then you can view the help file just fine.

Tom Clement said...

There's a much easier way to fix this. You just need to right click on the help file in windows explorer and choose "Properties". On the "General" tab, there is a button near the bottom labled "Unblock". Click that and you're good to go.

Thomas Lee said...

Re Tom Clement's point - agreed that you can unblock from the GUI. Two points: first, I was not expecting the HELP file initial results and it took a few minutes to work out why I was not seeing the contents. Second, Both Streams, and Unblock-File work great from the command line - no need for a gui!