From 062282a2a22b07d616dfd787cc29880d7847da84 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 9 Jul 1999 11:34:59 +0000 Subject: [PATCH] + Initial implementation --- fcl/tests/testz2.pp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fcl/tests/testz2.pp diff --git a/fcl/tests/testz2.pp b/fcl/tests/testz2.pp new file mode 100644 index 0000000000..a0a39a03fa --- /dev/null +++ b/fcl/tests/testz2.pp @@ -0,0 +1,25 @@ +Program testz2; + +uses zstream; + +Var F : TGZfileStream; + S : String; + i :longint; + c : char; +begin + Writeln ('Creating file.'); + S:='This is a sentence'#10; + F:=TGZFileStream.create('test.gz',gzopenWrite); + For I:=1 to 10 do + F.Write(S[1],Length(S)); + f.Free; + Writeln ('Done.'); + Writeln ('Reopening file for read.'); + F:=TGZFileStream.Create('test.gz',gzopenread); + Writeln ('Dumping contents:'); + While F.Read(C,SizeOf(c))<>0 do + write(c); + F.free; + Writeln('Done.'); +end. +