txt library

TXT and TXTZ parsing entry points.

Classes

ArchiveEntry
A physical entry of a book's container archive.
BinaryFile
Represents a binary book file.
Book
A fully parsed book, independent of its source format.
BookCover
A book cover: raw bytes plus the detected image type.
BookFile
Abstract representation of a file inside a book container.
BookMetadata
Format-agnostic book metadata extracted from any supported book file.
BookStatistics
Basic reading statistics computed from book content.
DocumentBook
A document-backed book produced by text and office-format adapters.
Files
The files contained in a parsed book.
The navigation (table of contents) of a book.
Represents a navigation point (table of contents entry) in a book.
ReadingOrderItem
One entry of a book's reading order.
TextFile
Represents a text book file.

Enums

BookFormat
The book formats supported by unseal.

Functions

parseTxtBook(Uint8List bytes, {String? sourceName}) → DocumentBook
Parses a plain TXT document into the common DocumentBook model.
parseTxtzBook(Uint8List bytes, {String? sourceName}) → DocumentBook
Parses a TXTZ ZIP container. metadata.opf is consumed as metadata and a manifest hint; it is never exposed as a reading document or independent format. All text members are rendered in stable natural path order.
readTxtMetadata(Uint8List bytes, {String? sourceName}) → BookMetadata
Reads only the metadata conventionally stored at the beginning of TXT. The bounded prefix keeps a multi-megabyte novel from being converted just to discover its title and author.
readTxtzMetadata(Uint8List bytes, {String? sourceName}) → BookMetadata
Reads metadata from a TXTZ archive without rendering text or extracting resources into the DocumentBook model.