I have written a small C# dll that reads a compressed file, decompresses it and writes it back out. The file was compressed using the raw deflate method from zlib. When run from a C# .NET application GzipArchive will decompress the file just fine. If I build the C# dll and register it for COM interop and call it from a Powerbuilder application then GzipArchive returns the error, The magic number in GZip header is not correct. Make sure you are passing in a GZip stream. Any thoughts why GzipArchive would behave differently when accessed via COM Interop. I have attached the zip file containing the source test file, a VS project for the DLL, a VS test app and a Powerbuilder application.
It would be great if you please share your working environment e.g. operating system, .NET Framework etc. Please also share the screenshot of the error that you are facing. We will setup the same environment at our side and investigate the issue.
We will use AsposeZipDecompress DLL via COM. Please share the steps that you are using to reproduce this issue at our end. This will help us to find the root cause of this issue. Thanks for your cooperation.
Windows 10, .NET 4.7.2, steps are in the read me file I provided.
AsposeZipDecompress_error.zip (56.9 KB)
Please spare us some time for the investigation of this issue. We will setup the same environment and test this issue and will get back to you soon.
Thank you for your quick response. I am attaching a doc file with screen shots from process monitor for both the C# app and Powerbuilder app when they load Aspose.Zip. The file clrcompression.dll is loaded in the C# .NET app but not the other. Not sure if this is relevant, but it is a difference. Process Monitor output.zip (95.2 KB)
Thanks for sharing the detail. We have logged this problem in our issue tracking system as ZIPNET-516 . You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
A post was merged into an existing topic: DOCX to PDF conversion issue with parentheses rendering using C#
I was wondering if I could get a status on this issue. Thank You.
Currently, your issue is under analysis phase. We will be sure to inform you via this forum thread once there is an update available on this issue. Thanks for your patience.
It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (ZIPNET-516) as ‘Not a Bug’.
Aspose.ZIP can extract raw deflated stream from .NET application but cannot do it from COM interop. However, extracting raw deflated steam it not declared as feature of Aspose.ZIP. Instead, extraction of such stream in .NET application is undocumented feature because of internals of CLR4 use zlib for deflating/inflating.
We suggest you please use the approach shared in your other thread here: