Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compression problems
#1
I need to compress-decompress streams just before Indy transmits them.

There is a reason I want to do this manually, instead of using the Indy IdCompressionIntercept, but I still use the Indy functions:

CompressStreamEx(InStream, OutStream, clMax, zsGZip);
and
DecompressStream(InStream, OutStream);.

The problem is, the compression works perfectly, and I can save the Stream to disk, and a 3th party unzip program correctly detect the zip format, and can decompress it.

But when I call DecompressStream(InStream, OutStream), I get a "ZLib Error (-5)" in

IdZLib:

class procedure EZlibError.RaiseException(const AError: Integer);
var
  LException: EZlibError;
begin
  LException := CreateFmt(sZLibError, [AError]);
  LException.FErrorCode := AError;
  raise LException;
end;

I tried 3 different IdZLibHeaders but no difference.
I cannot find any documentation on the error, and it also does not show where it actually occurs.

Why is the Decompression not working?

Delphy 10.2.3

Bart
---
Bart Kindt
CEO and Developer
SARTrack Limited
New Zealand
www.sartrack.nz
Reply


Messages In This Thread
Compression problems - by BartKindt - 10-16-2018, 08:34 PM
RE: Compression problems - by rlebeau - 10-19-2018, 07:10 PM
RE: Compression problems - by BartKindt - 10-19-2018, 08:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)