Skip to main content

Module zip_preview

Module zip_preview 

Source
Expand description

The preview picture inside the zip containers of Sketch, XMind, Keynote and IDML files (and SketchUp files saved as a zip). Used at import when QuickLook has no render (no generator for the app is installed).

The archive is untrusted. Entries are only matched by name, never used as paths. At most a few entries are read, each at most MAX_ENTRY bytes, and anything malformed means “no preview”.

Constants§

MAX_ENTRY
The most bytes read from one entry, whatever the zip header claims.

Functions§

entries
The entries that hold a file’s preview, best first.
handles
preview
The preview picture of the file at path; None when it isn’t a zip, has no such entry, or the entry is too big or not a picture.