Archive
The module responsible for create a zip file with the files.
Last updated
The module responsible for create a zip file with the files.
Last updated
To use this module, you need to inject it into the desired service.
In the example below, I created a
test.txt
file with the following content"Hello World"
. Remember that the write stream must contain the.zip
or.gz
extension, as it is a file inzip
format.
Importing the service inside the module.
You won't need to connect the pieces with any other module.
COMPRESSIONLEVEL
static
The compression level used to create the zip file.
_zlibCompressionLevel
private
Returns the zlib compression level based on the compression level.
_base
private
Returns the instance of the archiver.
setCompressionLevel
public
Set the compression level used to create the zip file.
getCompressionLevel
public
Get the compression level used to create the zip file.
joinWithReaders
public
Join the files with the zip file.