1

I have a variable data , the type of variable is: TIdBytes.

Variable contains some data encoded with gzip.

How to decode this data?

Johan
  • 73,011
  • 23
  • 185
  • 311
jmp
  • 2,292
  • 2
  • 28
  • 45

1 Answers1

5

If you want to decode the data manually, then look at the DecompressGZipStream() method of the TIdCompressorZLib component, or the TDecompressionStream class or Indy/DecompressStream() functions in the IdZLib.pas unit.

Remy Lebeau
  • 505,946
  • 29
  • 409
  • 696
  • I already tested them, they not working. And the unit name is IdZLibCompressorBase.pas – jmp Dec 22 '11 at 02:57
  • I found the problem why it's not working, i forgot to set: my_stream.Position := 0; – jmp Dec 22 '11 at 03:47
  • 1
    `TIdCompressorZLib` derives from `TIdZLibCompressorBase`. As its name suggests, `TIdZLibCompressorBase` is a base class, don't use it by itself. – Remy Lebeau Dec 22 '11 at 05:58