Janet 1.27.0-01aab66 Documentation
(Other Versions:
1.26.0
1.25.1
1.24.0
1.23.0
1.22.0
1.21.0
1.20.0
1.19.0
1.18.1
1.17.1
1.16.1
1.15.0
1.13.1
1.12.2
1.11.1
1.10.1
1.9.1
1.8.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
)
Zip Files
Index
zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize
cfunction (zip/add-bytes writer path data &opt comment flags)
Add a byte sequence to the zip writer.Community Examples / source
cfunction (zip/add-file writer path filename &opt comment flags)
Add a file to the zip writer.Community Examples / source
cfunction (zip/compress bytes &opt level into)
Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.Community Examples / source
cfunction (zip/decompress bytes &opt into)
Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.Community Examples / source
cfunction (zip/extract reader idx-or-filename &opt into flags)
Extract a file from the zip archive, either to memory or to a file on disk.Community Examples / source
cfunction (zip/file-directory? reader idx)
Check if a file index is a directory.Community Examples / source
cfunction (zip/file-encrypted? reader idx)
Check if a file is encrypted inside an archive.Community Examples / source
cfunction (zip/file-supported? reader idx)
Check if a file is supported with this verstion of miniz.Community Examples / source
cfunction (zip/get-filename reader idx)
Convert a file index index in the archive to a filename.Community Examples / source
cfunction (zip/locate-file reader path &opt comment flags)
Get the index of a particular filename in the archive.Community Examples / source
cfunction (zip/read-bytes bytes &opt flags)
Read a byte sequence as a zip archive. Returns a new zip reader.Community Examples / source
cfunction (zip/read-file filename &opt flags)
Read a file as a zip archive. Returns a new zip reader.Community Examples / source
cfunction (zip/reader-close reader)
Close a reader and free related memory.Community Examples / source
cfunction (zip/reader-count reader)
Get the number of files inside the zip archive. The files can be indexedCommunity Examples / source
cfunction (zip/stat reader idx)
Get stat information of file. Returns a new struct with the following fields: * :index - integer index in master directory * :version-made-by - zip verstion * :version-needed - zip version needed to unzip * :bit-flag * :method - compression method * :time - file time * :crc32 - checksum of file contents * :comp-size - size of file when compressed * :uncomp-size - size of file when uncompressed * :filename * :comment * :internal-attr * :external-attrCommunity Examples / source
cfunction (zip/version )
Get the version string of the underlying miniz library.Community Examples / source
cfunction (zip/write-buffer )
Create a new zip archive writer that write to memory.Community Examples / source
cfunction (zip/write-file dest-path)
Create a new zip archive writer that will write into an archive file.Community Examples / source
cfunction (zip/writer-finalize writer)
Finalize a writer, writing any zip files to disk. Return the writer.Community Examples / source