indy compressor doesn’t work, TIdCompressorZlib not found

  

I’m trying to decompress a gzip response, all the samples and demos and answers on the internet simply create a TIdCompressorZlib but i can’t find this in Delphi 10.3 FMX, i tried manually downloading and using TIdCompressorZlib but it had many errors and other dependencies so i gave up, i can see that idhttp.compressor uses IdZLibCompressorBase but doing something like:

idhttp.Compressor := IdZLibCompressorBase.TIdZLibCompressorBaseClass.Create(idhttp);

Doesn’t work either because in run time it throws the error:

—————————
Debugger Exception Notification
—————————
Project MiniDownloader.exe raised exception class EAbstractError with message ‘Abstract Error’.
—————————
Break Continue Help
—————————

I also tried forcing the response to not be a gzip to avoid decompressing, by using:

idhttp.Request.AcceptEncoding := ‘identity’;

But this also fails because the response remains compressed
I also tried using

IdZlib.DecompressStream(inputMemoryStream, outputMemoyStream);

But this also throws a runtime error :

—————————
Debugger Exception Notification
—————————
Project MiniDownloader.exe raised exception class EDecompressionError with message ‘ZLib Error (-5)’.
—————————
Break Continue Help
—————————

I don’t understand why this is so hard~! nothing works…!, is this because i’m not in VLC ? and i’m using FMX ? any solution and suggestion is much appreciated.

Comments are closed.