0

My code that is a copy from https://docwiki.embarcadero.com/CodeExamples/Alexandria/en/ZLibCompressDecompress_(Delphi) doesn't work as expected. A file is created and it look's like it is compressed. But there is no tool outside Delphi that can uncompress it.

Why?

Can someone show me a code example that works? And I prefer to make a gzip.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
Mikael
  • 1

1 Answers1

0

It is likely a zlib stream. (I say "likely", since the documentation is not clear.) If so, it will start with a 0x78 byte.

I can be decompressed using any similar zlib tool. I don't know what language or environment you are referring to with "outside Delphi".

To get a gzip stream instead of a zlib stream, try:

TZCompressionStream.Create(LOutput, clDefault, 15 + 16);
Mark Adler
  • 101,978
  • 13
  • 118
  • 158