CBZ libraries for C/C++
C and C++ have no comic-specific CBZ library; use a ZIP library and add the comic conventions yourself (natural page order, cover, ComicInfo.xml):
- libzip reads and writes ZIP with random access: open an entry by index or name without reading the rest of the archive. The best fit for a comic reader that shows one page at a time. BSD-3-Clause.
- libarchive reads ZIP, RAR, 7z and TAR through one streaming API. Pick it when you need CBR, CB7 and CBT too. Streaming means you walk entries in archive order; for random access, read the pages you need in one pass.
Neither library parses XML. The examples use pugixml to read ComicInfo.xml; any XML parser works.
- libarchive Read and write CBZ comic book archives in C/C++ with libarchive: list pages in natural order, extract the cover, read ComicInfo.xml and create a CBZ.
- libzip Read and write CBZ comic book archives in C/C++ with libzip: list pages in natural order, extract the cover, read ComicInfo.xml.