SkillAgentSearch skills...

Memzipimport

import library.zip in memory, with the interface the same as zipimport.

Install / Use

/learn @zyobi/Memzipimport
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Purpose

This module is mostly the same like the builtin module zipimport. While zipimport imports from a zip file, and memzipimport imports from zipped content in memory.

Usage

import sys
sys.memzip = {"library.zip": bytearray(open("lib.zip", "rb").read())}
sys.path.insert(0, "library.zip")
sys.path_hooks.insert(0, memzipimport.zipimporter)

There are three steps:

  • store zipped content in sys.memzip as an bytearray
  • insert a virtual library path
  • insert path hooks
View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks3

Languages

C

Security Score

60/100

Audited on Jan 21, 2025

No findings