Compressed FictionBook MIME Type

Learn what application/x-zip-compressed-fb2 identifies, how .fb2.zip and .fbz books work, and how Poly previews and indexes them.

MIME type details for application/x-zip-compressed-fb2

In active use
MIME typeapplication/x-zip-compressed-fb2
Extensions
.fb2.zip.fbz
Magic number50 4B 03 04
First standardizedUnknown
Created byfreedesktop.org shared-mime-info contributors
Browser support
Example applicationsFBReader, Foliate, calibre
Poly supportYes. Poly recognizes .fbz files and converts the compressed FictionBook to PDF. Conversion can fail for malformed or unsupported archives.
Indexed by PolyYes. After conversion, Poly indexes page text, OCR fallback, and page-level visual similarity. It does not index ZIP member names or the source XML structure directly.
Preview in PolyYes. Poly opens a paginated PDF representation, not a native reflowable FictionBook reader or archive browser.
Poly agentYes. The Poly agent can read the converted book's page text and rendered pages after conversion succeeds.

What is application/x-zip-compressed-fb2?

The application/x-zip-compressed-fb2 media type identifies a ZIP archive containing a FictionBook 2 ebook. It is commonly associated with a compound .fb2.zip filename. Poly also uses the shorter .fbz extension for the same practical idea: a compressed FB2 book.

The outer file is an ordinary ZIP container. Inside it is XML using the FictionBook 2 vocabulary, usually as one .fb2 member. Compressing the book saves space without changing its semantic structure. A compatible reader extracts the XML and presents its sections, paragraphs, notes, metadata, and embedded images as a reflowable ebook.

This is an unregistered implementation convention, not an IANA media type. The current IANA application registry has no x-zip-compressed-fb2 entry.1 The x- prefix and software support are important interoperability clues.

How to identify a compressed FB2 book

The freedesktop.org shared MIME database defines this type as a subclass of application/zip. Its filename rule matches *.fb2.zip. Its content rule looks for the ZIP local-file signature 50 4B 03 04 at byte zero and an archive member name containing .fb2 near the beginning of the archive.2

That four-byte signature is not unique to FictionBook. EPUB, office documents, Java archives, and ordinary ZIP files can begin with the same bytes. To identify the format confidently:

  1. Confirm that the outer file is a valid ZIP archive.
  2. Inspect member names without extracting them.
  3. Find the intended .fb2 member.
  4. Parse it as XML and confirm a FictionBook root in the http://www.gribuser.ru/xml/fictionbook/2.0 namespace.3

One book per archive gives readers the clearest result. Reader behavior is not uniform when an archive contains several FB2 books. FBReader supports both arrangements, while KDE's metadata extractor accepts only an archive with exactly one .fb2 entry.45

Changing novel.zip to novel.fb2.zip does not prove it contains a FictionBook document. Check the archive member and XML namespace when accurate detection matters.

Where this MIME type comes from

FictionBook 2 itself dates to Dmitry Gribov's 2004 XML schema.3 The compressed form does not define a second ebook vocabulary. It applies ZIP packaging to the same FB2 document.

The MIME identifier comes from desktop-software practice. The freedesktop.org shared MIME database describes it as a compressed FictionBook document, associates it with .fb2.zip, and makes it a subtype of ZIP.2 KDE uses the identifier in its current FictionBook metadata extractor, which opens the archive and reads the enclosed FB2 XML.5

The exact date when this unregistered name was first adopted is not established in an authoritative registration, so it is listed as unknown here. It remains in active use across Linux desktop components and ebook applications.

How to open .fb2.zip and .fbz files

A normal browser does not provide a native FictionBook reading interface. It will generally download the file or treat it as a ZIP archive. Use an ebook application that explicitly supports compressed FB2:

  • FBReader lists fb2.zip support on desktop, Android, and iOS.4
  • Foliate advertises application/x-zip-compressed-fb2 as a supported document type through its desktop integration.6
  • calibre provides an FB2 input path and can convert FictionBook content into formats such as EPUB or PDF.7

If a reader rejects .fbz, try the conventional compound name .fb2.zip. If it opens the file as a generic archive, verify that the archive contains a valid .fb2 document and is not encrypted.

Support in Poly

Poly has a dedicated BookFbz document type for application/x-zip-compressed-fb2. Its filename table maps .fbz to that type, and its document loader sends the file to calibre's ebook-convert. The resulting PDF then enters Poly's normal page-processing pipeline.

Repository tests exercise a real .fbz fixture and verify a PDF representation, five thumbnail sizes, extracted text, a file embedding, and page embeddings. After conversion succeeds, Poly provides:

  • A thumbnail and rendered page thumbnails.
  • A paginated preview in the PDF viewer.
  • Full-text and semantic search, plus page-level visual similarity.
  • Page text and rendered pages that the Poly agent can read.

Poly does not expose the ZIP member list or the original FictionBook XML. Its preview also loses native ebook reflow and reader typography because the conversion fixes the book into PDF pages.

Poly's filename inference recognizes .fbz, not the compound .fb2.zip suffix. An .fb2.zip upload needs accurate MIME information to reach the compressed-FictionBook path; filename-only inference sees the final .zip suffix. Conversion can also fail for encrypted, damaged, malformed, or otherwise unsupported archives.

The general document limits apply after routing: files larger than 1 GiB are not processed, and the PDF pipeline indexes at most 1,024 converted pages.

Compressed FB2 compared with raw FB2 and EPUB

PropertyCompressed FB2Raw FB2EPUB
Outer representationZIP archive containing FB2 XMLOne XML documentZIP package with XHTML or SVG, CSS, metadata, and resources
Common extension.fb2.zip; sometimes .fbz.fb2.epub
Media typeapplication/x-zip-compressed-fb2application/x-fictionbook+xmlapplication/epub+zip
IANA registrationNoNoYes
Browser reading supportNo native readerNo native readerNo consistent native reader
Main benefitSmaller FB2 distribution while preserving the source XMLDirect access to the semantic XMLBroader publishing and retail ecosystem

Unzipping a compressed FB2 restores the original .fb2 member without ebook transcoding. Converting either FB2 form to EPUB is different: the converter must translate FictionBook-specific structures and embedded binary elements into an EPUB package.

Converting a compressed FictionBook file

For a one-book archive, extraction is the least destructive operation:

unzip novel.fb2.zip

To convert, give the extracted .fb2 file a destination whose extension selects the output format:

ebook-convert novel.fb2 novel.epub
ebook-convert novel.fb2 novel.pdf

EPUB preserves a reflowable reading model and generally has wider support. PDF fixes pagination for sharing or printing. Review the cover, chapter order, table of contents, notes, poetry indentation, images, language metadata, and non-Latin text after conversion.

Treat an unfamiliar compressed book as untrusted input. Inspect archive paths and declared sizes before extraction to avoid path traversal or excessive expansion, and process the enclosed XML with external-entity access disabled. Do not assume that an ebook reader's archive and XML parsers are immune to malformed input.

Footnotes

  1. Internet Assigned Numbers Authority. Media Types Registry. The application registry does not include application/x-zip-compressed-fb2.
  2. freedesktop.org. Shared MIME-info database definition. Defines the ZIP parent type, *.fb2.zip glob, and content-matching rule for compressed FictionBook documents. 2
  3. FictionBook project. FictionBook 2 XML Schema. Defines the FictionBook 2 namespace and XML vocabulary; the schema carries Dmitry Gribov's 2004 copyright. 2
  4. FBReader. Book Formats Support and FB2 archive FAQ. Lists fb2.zip support on desktop, Android, and iOS, and explains that an archive may hold one or several FB2 files. 2
  5. KDE. FictionBook metadata extractor source. Handles application/x-zip-compressed-fb2 by opening a ZIP containing exactly one .fb2 entry. 2
  6. Foliate. Desktop application metadata. Declares support for application/x-zip-compressed-fb2.
  7. calibre. ebook-convert command documentation. Documents calibre's dedicated FB2 input conversion options.
© Poly Corp. 2026