module documentation

zipfile wrapper for Stick Firmware

Function get_file_list Gets file list of zip archive
Function unpack_safe Unpacks zip archive
def get_file_list(zip_path: str) -> list[str]:

Gets file list of zip archive Args: zip_path (str): Full path to zip archive (ex. /usr/zip.zip) Returns: list[str]: List of files in zip archive Example: >>> get_file_list("/usr/zip.zip") ["super_secret_file.txt", "cat.png"]

def unpack_safe(zip_path: str, folder: str, chunk_size: int = 1024):

Unpacks zip archive Args: zip_path (str): Full path to zip archive (ex. /usr/zip.zip) folder (str): Full path to the folder where zip archive will be unpacked (doesn't need to exist) chunk_size (int, optional): Unpacking chunk size in bytes, default 1024