[Oberon] Homework on ZipTool (was Re: ZipTool1.Arc (Aug 5) can't handle DOS files ?)
peter_easthope at gulfnet.sd64.bc.ca
peter_easthope at gulfnet.sd64.bc.ca
Sun Sep 1 23:28:50 CEST 2002
Pieter & others,
pjm> Homework ... document the missing options and
commands in Zip.Tool.
Admittedly this is a mediocre job. For a thorough job I should
have studied the sources but this is not a good opportunity.
REVISIONS TO Zip.Tool
OPEN ISSUES
1. Does the module always insist on the suffix "Zip" for archive
names? I understand the rationale in creating an archive.
What about for Directory and Extract? The syntax in
the ZipTool could be a little more clear about the suffixes.
2. What exactly is meant by "level" and "strategy" in
compression? This should be clarified in the ZipTool.
3. Given the syntax and capabilities of Add and Extract,
is export of AddFile and ExtractFile justified?
4. An attempt to extract an entry with a name not consistent
with the naming rules of the filesystem should produce an
error message and then continue.
5. Logically, Add should follow Directory but in the module
Add follows ExtractAll.
ZipTool.Directory [\d | \D] Zipfile ~
ZipTool.Directory [\d | \D] ^
With option \d, details of entries of the specified zip-archive are
shown and there is a style element for tabulation.
\D is the same as \d except that there is no style element.
ZipTool.Add [\level [\strategy]] ZipFile Entry1 [=> NewName1] Entry2 [=> NewName2] ... ~
ZipTool.Add [\level [\strategy]] ZipFile ^
ZipTool.Add [\level [\strategy]] ^ ^
level = "0" | "1" | "2" ... "9".
strategy = "0" | "1" | "2".
Option \level specifies the compression level. The default
is -1. level = "0" for no compression. level = "9" for maximal
compression. [More explanation needed.]
Option \strategy specifies the compression strategy.
[More explanation needed.]
Example: ZipTool.Add \5 \2 Photos.Zip mountain.jpg tree.jpg ~
Note "Photos.Zip" rather than "Photos".
ZipTool.Extract [\d] [\o] Zipfile.Zip file1 [=> NewName1] file2 [=> NewName2] ... ~
ZipTool.Extract [\d] [\o] Zipfile.Zip ^
ZipTool.Extract [\d] [\o] ^ file1 [=> NewName1] file2 [=> NewName2] ... ~
ZipTool.Extract [\d] [\o] ^ ^
With option \d, the file is stored in the directory according to the
relative path in the file name of the entry.
With option \o, files with the same name are overwritten.
Otherwise they are renamed to filex.Bak
ZipTool.ExtractAll [\d] [\o] [\p DstPrefix] ZipFile1.Zip ZipFile2.Zip ... ~
ZipTool.ExtractAll [\d] [\o] [\p DstPrefix] ^
With option \d, the file is stored in the directory according
to the relative path in the file name of the entry.
With option \o, files with the same name are overwritten.
Otherwise they are renamed to filex.Bak.
With option \p, DstPrefix is prefixed to all entries extracted.
ZipTool.Delete Zipfile.Zip file1 file2 ... ~
ZipTool.Delete Zipfile.Zip ^
ZipTool.Delete ^
Specified entries are deleted from the archive.
Peter Easthope http://carnot.pathology.ubc.ca/
More information about the Oberon
mailing list