After decompression, you can use the decompression software (such as WinRAR and WinZip) to browse or decompress the package. An unencrypted Epub e-book consists of three parts. The file structure is shown in:
1. File: mimetype
Each Epub e-Book contains a file named mimetype with the same content, which is used to describe the file format of Epub. The file content is as follows:
| Application/Epub + Zip // annotation, indicating that you can use Epub and zip tools to open |
2, directory: META-INF
According to the OCF specification, the META-INF is used to store container information. By default (encryption), the directory contains a file, namely, container. XML, with the following content:
| <? XML version = '1. 0' encoding = 'utf-8'?> <Container xmlns = "urn: Oasis: names: TC: OpenDocument: xmlns: container" version = "1.0"> <rootfiles> <rootfile full-Path = "oebps/content. OPF "media-type =" application/oebps-package + XML "/> </rootfiles> </container> |
Container. the main function of XML is to tell the reader that the path (red) of the root file of the e-book is open. Generally, the container. the XML file does not need to be modified unless you change the path and name of the root file.
In addition to the container. xml file, OCF also specifies the following files:
(1) [manifest. XML], file list (2) [metadata. XML], metadata (3) [signatures. XML], digital signature (4) [encryption. XML], encryption (5) [rights. XML], permission management for Epub ebook, these files are optional.
3. Directory: oebps
The oebps directory is used to store ops documents, OPF documents, CSS documents, and NCX documents. If you are creating a Chinese ebook, The oebps directory also includes TTF documents (I .e. font documents ), you can also create sub-directories in the oebps directory, such as creating the chapter directory and storing the ops documents of each chapter in the chapter directory. Example of an Epub ebook oebps document:
The content. OPF file and TOC. NCX file are required. Other files can be determined based on the actual situation of the ebook.
For the content. OPF file, see the OPF Analysis in the blog.
For more information about the TOC. NCX file, see section toc. NCX.
Original article address