So, hab den Fehler nun gefunden. Der Quellstream (Filestream) war nur zum lesen geöffnet.
Delphi-Quellcode:
{Kompremiert den Stream}
PROCEDURE CompressStream(aStream: TStream);
VAR
{$ifdef VER200} //Delphi 2009
zc: TZCompressionStream;
{$else}
{$ifdef VER180} //Delphi 2006 or Turbo Delphi
zc: TCompressionStream;
{$endif}
{$endif}
ms: TMemoryStream;
BEGIN
ms := TMemoryStream.Create;
TRY
{$ifdef VER200} //Delphi 2009
zc := TZCompressionStream.Create(ms, zcMax);
{$else}
{$ifdef VER180} //Delphi 2006 or Turbo Delphi
zc := TCompressionStream.Create(clMax, ms);
{$endif}
{$endif}
TRY
zc.CopyFrom(aStream, 0);
FINALLY
zc.Free;
END;
aStream.Size := 0;
aStream.copyFrom(ms, 0);
FINALLY
ms.Free;
END;
END;
{Dekompremiert den Stream}
PROCEDURE DecrompressStream(aStream: TStream);
VAR
{$ifdef VER200} //Delphi 2009
zc: TZDecompressionStream;
{$else}
{$ifdef VER180} //Delphi 2006 or Turbo Delphi
zc: TDecompressionStream;
{$endif}
{$endif}
ms: TMemoryStream;
BEGIN
ms := TMemoryStream.Create;
TRY
{$ifdef VER200} //Delphi 2009
zc := TZDecompressionStream.Create(aStream);
{$else}
{$ifdef VER180} //Delphi 2006 or Turbo Delphi
zc := TDecompressionStream.Create(aStream);
{$endif}
{$endif}
TRY
ms.CopyFrom(zc, 0);
FINALLY
zc.Free;
END;
aStream.Size := 0;
aStream.copyFrom(ms, 0);
FINALLY
ms.Free;
END;
END;
Danke für Eure Hilfe.
Greeny