ePubs are essentially zipped websites, so Papyrix requires code to read Zip files! This is in its own support-library, wrapping uzlib. Aided by a callback to supply uzlib more bytes.
There's a method reopen the file (via helpers) if necessary, attempts to read a header (via another helper) from the zipfile propagating failures, seeks to the start of the directory listing, repeatedly reads & decodes entries, & cleans up.
1/?