PageRenderTime 52ms CodeModel.GetById 30ms app.highlight 1ms RepoModel.GetById 11ms app.codeStats 0ms

/packages/paszlib/examples/example2.pas

https://github.com/slibre/freepascal
Pascal | 33 lines | 18 code | 7 blank | 8 comment | 0 complexity | 69a338110354b1df1fd4032faa73db0b MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1program EnhancedZipperExample;
 2
 3{$mode objfpc}{$H+}
 4
 5uses
 6  Classes, zstream, zipper;
 7
 8var
 9   z: TZipper;
10   zfe: TZipFileEntry;
11begin
12  z:=TZipper.Create;
13  z.FileName:='fpcCompressionLevelTestFile.zip';
14  try
15    //Default Compression Level
16    zfe:=z.Entries.AddFileEntry(ParamStr(0));
17    //Compression Level = none ( Store )
18    zfe:=z.Entries.AddFileEntry(ParamStr(0));
19    zfe.CompressionLevel:=clnone;
20    z.ZipAllFiles;
21  finally
22    z.Free;
23  end;
24  {
25   The result can be checked with the command(On Linux):
26   unzip -v fpcCompressionLevelTestFile.zip
27   The column Method Shows different values to each file
28  }
29end.
30
31
32
33