larzarchive
Safe zip/tar archives.
Create and list zip and tar archives, and extract them safely — path-traversal (zip-slip / tar-slip) attacks are rejected via realpath checks.
larzscript pkg install archive
What you get
- Create & list zip/tar
- Zip-slip / tar-slip safe
- realpath-guarded extract
- Zero dependencies
Try it
import "archive" as archive
let z = archive.zip_create([{"name": "hello.txt", "data": "hi there"}])
print(len(z), "bytes")
print(archive.zip_list(z))Output
124 bytes
[{name: hello.txt, data: hi there, crc32: 3819140844}]Why it's in the Larz Stack
larzarchive is a real Larzscript package (larzscript pkg install archive) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.