ZIP-Compression

This module makes it possible to produce, with a binary method, a .zip file which is filled with any given binary data. This .zip file can still be given a password and a comment. In addition, the files of a .zip archive can be extracted.

So that the methods for Zip compression are available, the module must be configured as follows:

<module type="Onion.RenderEngine.CommonModules.CompressionModule, Onion.RenderEngine.CommonModules" />
Namespace: http://onion.net/2010/compression/zip
NameParameterReturn typeDescription
addBinary filename:string
xlink:string
[fromDataSource:boolean]
void Adds a binary file to a .zip binary stream.
addLiteral filename:string
xlink:string
encoding:string
void Adds a text file to a .zip binary stream.
create level:number void Creates an empty .zip binary stream.
extract xlink:string
[fromDataSource:boolean]
nodeset Returns the contents of a .zip file as nodeset.
extractEntry entry:nodeset void Extracts content from a .zip file and writes the data into the binary stream.
finish string Completes the .zip binary stream.
setComment comment:string void Creates a .zip comment.
setPassword password:string void Gives the .zip file a password.