If you use #2 above, you will need to manually decode the returned data. I found the LVK components from the LVK web site to be most helpful in this task. I couldn't easily get the standard zlib or Indy10 zlib implementation to work with gzip encoding, so I ended up using LVK. Using the code below, you get the data back in compressed format and decode it. As an aside, it looks like LVK also supports the deflate option in addition to the gzip option, and has TONS of components and utility code.
// add lvkZLibUtils to the uses clause procedure TForm3.Button2Click(Sender: TObject); var inStream, outStream: TMemoryStream; begin inStream := TMemoryStream.Create; try IdHttp1.Get('http://www.pgatour.com', inStream); outStream := TMemoryStream.Create; try gZipDecompress(inStream, outStream); outStream.Position := 0; Memo1.Lines.LoadFromStream(outStream); finally outStream.Free; end; finally inStream.Free; end; end;
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.