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
  • 74,508
  • 24
  • 191
  • 319
jmp
  • 2,456
  • 3
  • 30
  • 47

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
  • 555,201
  • 31
  • 458
  • 770
  • 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