Z64 (Z64 v0.1.0)
View SourceZ64 is a high-performance Elixir library for decoding ZIP files,
specifically supporting PKWARE's Deflate64 (Compression Method 9) decompression,
which is not natively supported by OTP's :zip module.
Summary
Functions
Extracts and decompresses a specific file by its filename from the ZIP archive. Accepts either a file path or a binary containing ZIP data.
Lists all file entries inside the given ZIP archive. Accepts either a file path or a binary containing ZIP data.
Unzips all file entries from the ZIP archive and writes them into output_dir.
Accepts either a file path or a binary containing ZIP data.
Functions
Extracts and decompresses a specific file by its filename from the ZIP archive. Accepts either a file path or a binary containing ZIP data.
Returns {:ok, decompressed_binary} or {:error, reason}.
@spec list_entries(String.t() | binary()) :: {:ok, [Z64.Entry.t()]} | {:error, term()}
Lists all file entries inside the given ZIP archive. Accepts either a file path or a binary containing ZIP data.
Returns {:ok, [%Z64.Entry{filename: "file.txt", compressed_size: 100, uncompressed_size: 200, compression_method: 9, ...}]}
or {:error, reason}.
Unzips all file entries from the ZIP archive and writes them into output_dir.
Accepts either a file path or a binary containing ZIP data.
Returns :ok or {:error, reason}.