Zstream.entry
entry
, go back to Zstream module for more information.
Specs
entry(String.t(), Enumerable.t(), Keyword.t()) :: entry()
Creates a ZIP file entry with the given name
.
The enum
could be either lazy Stream
or List
. The elements in enum
should be of type iodata
Options
:coder
(module | {module, list}) - The compressor that should be used to encode the data. Available options are:Zstream.Coder.Deflate
- use deflate compressionZstream.Coder.Stored
- store without any compression- Defaults to
Zstream.Coder.Deflate
:encryption_coder
({module, keyword}) - The encryption module that should be used to encrypt the data. Available options are:Zstream.EncryptionCoder.Traditional
- use tranditional zip encryption scheme.:password
key should be present in the options. Example{Zstream.EncryptionCoder.Traditional, password: "secret"}
Zstream.EncryptionCoder.None
- no encryption- Defaults to
Zstream.EncryptionCoder.None
:mtime
(DateTime) - File last modication time. Defaults to system local time.
Disable Data Descriptor
By default, zstream will use the data descriptor feature and skip the crc32 and size value in the local file header. This might not work with some old versions of zip since this was a later addition to the zip format to support streaming
If the file size and crc32 are known, this feature can be
disabled. NOTE: If data_descriptor
is set to false, then the coder
should be set to Zstream.Coder.Stored
as well.
:data_descriptor
(boolean) - Disable Data Descriptor. Defaults to true:size
(integer) - Size of the File.:crc32
(integer) - CRC32 of the File.