readEpub

fun readEpub(source: Source, encoding: String = Constants.CHARACTER_ENCODING): Book(source)

Reads an EPUB from an okio Source. Loads all resource bytes into memory.


fun readEpub(fileSystem: FileSystem, zipPath: Path, encoding: String = Constants.CHARACTER_ENCODING, lazyLoadedTypes: List<MediaType> = emptyList()): Book(source)

Reads an EPUB from a ZIP file in the given filesystem at zipPath.

Resources whose MediaType is in lazyLoadedTypes keep only a stub in memory; their bytes are read from the ZIP on demand.


fun readEpub(resources: Resources, result: Book = Book()): Book(source)

Builds a Book from already-loaded Resources.

Low-level entry point: locates and processes the package and NCX documents, populating result in place.