Database row with bytes

HI,

I think it’s necessary to decompress. Can you try the following?

    using (var msSrc = new MemoryStream(in_arrByte))
    using (var gs = new System.IO.Compression.GZipStream(msSrc, System.IO.Compression.CompressionMode.Decompress))
    {
        using (var msDest = new MemoryStream())
        {
            gs.CopyTo(msDest);
            msDest.Position = 0;
            result = new byte[msDest.Length];
            msDest.Read(result, 0, result.Length);
        }
    }

note: The above is C# code.

The following is a sample mock.

Sample20230318-3L.zip (4.8 KB)

OR

Can you share your current output file?

Regards,

Thanks, you’re the best! That’s what the problem was. I did all my tries in the immediate pane, which is not the same as in invoke code.

I don’t think we have a ZIP. Perhaps it’s an encryption?
Most are RFT files (and readable) but this in a Word Doc in the orignal application. But those docx arr usually as well zipped. However, unzipping ist not possible

Hi,

It’s not pkzip but zlib compressed. Can you try the following? I got the following decompress data from your file.

image

    using (var msSrc = new MemoryStream(in_arrByte))
    using (var gs = new System.IO.Compression.ZLibStream(msSrc, System.IO.Compression.CompressionMode.Decompress,true))
    {
        using (var msDest = new MemoryStream())
        {
            gs.CopyTo(msDest);

            msDest.Position = 0;
            result = new byte[msDest.Length];
            msDest.Read(result, 0, result.Length);
        }
    }

Sample20230318-3Lv2.zip (7.7 KB)

Regards,

1 Like

Your are my hero!!! :ok_hand:
That’s realy cool and I wasn’t aware of the ZLib issue. It’s work fine now. I can extract hundreds of rtf now. Thank you very much Yoichi!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.