Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #154362

Re: How to copy & read a huge zipped book with thousands of html & jpeg files

From Maria Sophia <mariasophia@comprehension.com>
Newsgroups comp.mobile.android, alt.os.linux, alt.comp.os.windows-10
Subject Re: How to copy & read a huge zipped book with thousands of html & jpeg files
Date 2026-07-06 10:28 -0600
Organization BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID <112gl3u$28c1$1@nnrp.usenet.blueworldhosting.com> (permalink)
References (8 earlier) <112ed43$1cjg0$1@dont-email.me> <navuctFifh4U1@mid.individual.net> <112fd4t$ua0$1@nnrp.usenet.blueworldhosting.com> <nb1d07FpadoU1@mid.individual.net> <nb1e25FpadoU3@mid.individual.net>

Cross-posted to 3 groups.

Show all headers | View raw


Carlos E. R. wrote:
> Q: I have recently seen "books" transferred as a ZIP archive of a large 
> html tree. Calibre calls a browser to see a page at a time, AFAIK. I 
> wonder if there is software that displays that ZIP as a book directly, 
> better on a tablet.
> 
> Yes. What you've seen is often called an **HTMLZ** (HTML in a ZIP), or 
> simply a ZIP containing a static website. It's a nice format because it 
> preserves hyperlinks, CSS, images, and search indexes while compressing 
> very well.
> 
> The difficulty is that there isn't a universally adopted "book reader" 
> for zipped HTML trees analogous to EPUB readers.
> 
> Here are the main options:
> 
> * **Calibre**: as you note, it essentially extracts or serves the HTML 
> and uses an embedded browser. It isn't really a dedicated HTML book 
> renderer.
> 
> * **KOReader** (Android, Linux, Kobo, Kindle): probably the closest to 
> what you're looking for. It primarily supports EPUB, PDF, DjVu, etc., 
> but it can also browse HTML files. However, it doesn't natively treat an 
> arbitrary ZIPped website as a single book.
> 
> * **Static website in a browser**: on Android or Linux you can simply 
> unzip the archive and open `index.html`. Browsers do a surprisingly good 
> job. Firefox on Android, for example, can open local HTML files (with a 
> bit of help from a file manager).
> 
> * **Mini HTTP server**: many people run
> 
>    ```bash
>    python3 -m http.server
>    ```
> 
>    in the extracted directory and browse to `http://localhost:8000/`. 
> This avoids issues some browsers have with `file://` URLs and JavaScript.
> 
> ### Why EPUB became dominant
> 
> An EPUB is essentially:
> 
> ```
> book.epub
>      „€€ ZIP archive
>          †€€ XHTML files
>          †€€ CSS
>          †€€ images
>          †€€ metadata
>          „€€ navigation (table of contents)
> ```
> 
> So EPUB is really a standardized HTML tree in a ZIP with metadata. 
> Readers know how to paginate it, remember your position, annotate, 
> search, adjust fonts, etc. A raw ZIP of HTML lacks that standard structure.
> 
> ### If your documentation is generated
> 
> For things like Rust docs, Python docs, man-page collections, or API 
> documentation, I would actually **keep them as HTML** rather than 
> converting to EPUB. Documentation relies on hyperlinks more than on 
> linear reading, and browsers excel at that.
> 
> ### An interesting possibility
> 
> It wouldn't be hard to write a small application that:
> 
> * opens a ZIP without extracting it permanently,
> * serves its contents through an embedded HTTP server,
> * displays them in a WebView,
> * remembers your position and reading history.
> 
> Modern ZIP libraries allow random access, so the pages needn't even be 
> unpacked to disk. I'm a little surprised there isn't a well-known 
> open-source app that does exactly this, because it would be ideal for 
> offline documentation on a tablet.
> 
> Out of curiosity, are you mainly thinking of **technical documentation** 
> (Rust, Python, Linux man pages, etc.), or of **books** distributed as 
> HTML? The best tool tends to differ between those two use cases.
> 
> 
> Q: I was thinking of that rust documentation, but as an example of the 
> system.
> 
> I think the Rust documentation is actually an excellent example because 
> it's *not* a linear book in the EPUB sense. It's a small self-contained 
> website. That changes what the ideal reader looks like.
> 
> If I were designing an offline documentation system today, I'd package 
> it as:
> 
> ```
> rust-book.zip
> †€€ index.html
> †€€ ch01.html
> †€€ css/
> †€€ fonts/
> †€€ images/
> †€€ search-index.js
> „€€ ...
> ```
> 
> and the "reader" would simply:
> 
> * mount or read the ZIP directly;
> * expose it through an internal HTTP server (or a custom URL scheme);
> * render it in a browser component (WebView, Qt WebEngine, etc.);
> * remember the last page, bookmarks, and maybe annotations.
> 
> No conversion to EPUB would be necessary.
> 
> The nice thing is that all the navigation, CSS, search, and JavaScript 
> already exist. You'd just be providing a pleasant container around them.
> 
> ### Existing software gets close
> 
> There are a few projects in the same spirit:
> 
> * **Zeal** (Linux/Windows) and **Dash** (macOS) store documentation in 
> compressed docsets. Internally, these are HTML trees plus an index 
> database. They're aimed at API documentation rather than books.
> * **DevDocs Offline** projects cache the HTML documentation for offline use.
> * Browser-based **Progressive Web Apps** can cache entire documentation 
> sites for offline use, although support varies.
> 
> The common theme is that they're all essentially shipping HTML, not 
> inventing a new document format.
> 
> ### Why browsers aren't terrible readers anymore
> 
> Twenty years ago, HTML was a poor "book" format because pages were 
> static and browsers had little support for reading workflows. Nowadays 
> browsers have:
> 
> * full-text search,
> * history,
> * zoom,
> * dark mode,
> * responsive layout,
> * good typography,
> * JavaScript-based navigation.
> 
> For technical documentation, that's often *better* than an EPUB reader, 
> because the documentation was authored as a website in the first place.
> 
> ### A feature I'd still like to see
> 
> One thing I haven't seen is a generic **"ZIP book reader"**: point it at 
> any ZIP containing an `index.html`, and it treats it like a book. It 
> would need only a handful of features:
> 
> * open ZIP without extracting it;
> * detect the entry page (`index.html`);
> * keep reading position;
> * bookmarks;
> * optional full-text search (using an embedded index if present).
> 
> That would cover not only the Rust Book, but also many documentation 
> bundles, offline manuals, and even archived wikis. It's a surprisingly 
> simple concept, yet I don't know of a mainstream application dedicated 
> to it.

Wow. That was jam-packed with good information. Let's summarize first. 

HTMLZ = HTML-in-a-ZIP.  
It's literally just a ZIP file containing a folder of HTML pages, images,
CSS and JavaScript. It's apparently what my reference manual happens to be.

EPUB is basically the same idea, but with a standardized structure and
extra metadata so book readers know how to paginate, bookmark, search, etc.

Apparently there is no universal HTMLZ reader on tablets.
EPUB readers exist everywhere, but HTMLZ readers do not.

Generally we can read a ZIPped HTML tree by
 a. Unzipping it and opening index.html in a browser
    (which is what I did on Windows and it would work on Linux too)
 b. Or running a tiny local web server and browsing to it
    (which Andy, Carlos & I had to do on Android due to SAF rules)
 c. Or using specialized documentation apps (Zeal, Dash, DevDocs)
    (none of which do I have any experience whatsoever using)
    i. Zeal (Linux/Windows)
    ii. Dash (macOS/iOS)
    iii. DevDocs (offline, for programming docs)
    iv. Kiwix (reads ZIM files, not ZIPs, but can convert)

I agree that, for technical documentation, HTML is often better than EPUB
because it's designed for hyperlinks, search and non-linear navigation.

It would be nice if someone writes a simple app that opens a ZIP, serves it
internally and displays it like a book-because it would solve all of this	.

In my Android 16 case, and also in the case of Andy & Carlos on Android,
the real problem was SAF doesn't allow relative URLs in custom folders.

So any solution that works on Android, has to take SAF limitations into
account, where I looked up how to view these thigns on iOS & it's similar.

On Android, we found that running a tiny web server worked. 
But on Android 10+, we could also have tried what Carlos used:
 a. An older version of CX file Manager has a built-in web server
 b. So does X-plore File Manager
 c. And I'm told MiXplorer has excellent HTML-Z handling features

Interestingly, iOS seems to handle relative links *better* than Android.
What's *different* about iOS is that iOS doesn't use SAF. Yipee!

An HTMLZ (a ZIP full of HTML with relative paths) will work on an iPad.  
 a. iPadOS does not break relative links the way Android 10+ does.
 b. iPadOS does support relative paths inside an HTMLZ
 c. iPadOS gives the browser real filesystem paths, not SAF streams.
 d. So the browser sees the directory structure normally.
This means the 500MB shop manual will behave like a normal offline website.
Safari will load the entire manual correctly.

Even so, we can still use the server method on iOS as we did on Android.
All of thse can run the same "python3 -m http.server" we used on Android.
 a. iSH (Linux emulator)
 b. Pythonista
 c. Kodex
Once we start the HTTP server in $DOCUMENT_ROOT, then we point a browser to
 <http://localhost:8000/>

So, had I tried my iPads first, prior to Android, it would have worked.
(Although it's an Apple disaster trying to get a large file onto the iPad.)

In summary, on Android 10+ the SAF mechanism destroys POSIX paths outside
of the four public directories for web browser, so in order to put huge
complex HTML-Z documentation on Android 16 outside of the four public
directories, we had to employ a local server (or convert to EPUB/PDF).

Overall, I'm glad I ran into this problem because I learned about SAF and
how it screws up POSIX file paths in custom folders when browsing HTML.

And, I learned from testing Calibre for Carlos that EPUBs have a fantastic
search mechanism for extremely complex data structures (as good as PDF).

And I learned that for huge, image-heavy, cross-linked manuals, HTML in a
browser is the fastest method, so there's a place for HTMLZ after all.
-- 
I don't favor platforms; I measure them as I report truthfully about them.

Back to comp.mobile.android | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 18:40 -0400
  Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 21:17 -0400
    Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 21:48 -0400
      Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 22:51 -0400
        Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 23:57 -0400
          Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-04 23:13 -0600
          Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 13:29 +0200
            Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-05 14:48 +0100
              Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 10:06 -0600
              Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 19:10 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Computer Nerd Kev <not@telling.you.invalid> - 2026-07-05 17:37 +0000
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Alan <nuh-uh@nope.com> - 2026-07-07 11:11 -0700
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-05 21:00 +0100
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 22:50 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 23:06 -0600
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:05 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:24 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 10:28 -0600
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 19:50 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 09:36 -0600
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 19:56 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Dave Royal <dave@dave123royal.com> - 2026-07-06 07:58 +0100
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-06 12:12 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 15:12 -0600
        Re: How to copy & read a huge zipped book with thousands of html & jpeg files Arno Welzel <usenet@arnowelzel.de> - 2026-07-06 17:53 +0200
          Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-06 10:47 -0600
      Re: How to copy & read a huge zipped book with thousands of html & jpeg files Andy Burns <usenet@andyburns.uk> - 2026-07-05 08:35 +0100
        Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 10:38 -0600
          Re: How to copy & read a huge zipped book with thousands of html & jpeg files Andy Burns <usenet@andyburns.uk> - 2026-07-05 18:22 +0100
            Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 12:16 -0600
          Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 19:41 +0200
            Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 12:54 -0600
              Re: How to copy & read a huge zipped book with thousands of html & jpeg files "Carlos E. R." <robin_listas@es.invalid> - 2026-07-05 23:11 +0200
                Re: How to copy & read a huge zipped book with thousands of html & jpeg files Maria Sophia <mariasophia@comprehension.com> - 2026-07-05 15:23 -0600
  Re: How to copy & read a huge zipped book with thousands of html & jpeg files Arno Welzel <usenet@arnowelzel.de> - 2026-07-06 17:48 +0200

csiph-web