CBT libraries
A CBT is a plain TAR archive, and tar support is easy to find: Go, Python, .NET and PHP have it built in. TAR has no index, so libraries read entries in order; to show page N, scan once and remember offsets, or extract all pages into memory. For general TAR information see the TAR page.
| Language | Library | Read | Write | Notes |
|---|---|---|---|---|
| C/C++ | libarchive | yes | yes | one API for CBZ, CBR, CB7, CBT |
| C# | System.Formats.Tar | yes | yes | built into .NET 7+ |
| C# | SharpCompress | yes | yes | one API for ZIP, RAR, 7z, TAR |
| Java | Apache Commons Compress | yes | yes | TarFile with random access, streams |
| Go | archive/tar | yes | yes | standard library |
| Python | tarfile | yes | yes | standard library |
| Python | comicbox | yes | converts to CBZ | comic-specific metadata, pages, covers |
| Ruby | minitar | yes | yes | pure Ruby |
| Ruby | ffi-libarchive | yes | yes | libarchive binding |
| Rust | tar | yes | yes | pure Rust |
| PHP | PharData | yes | yes | bundled phar extension |
By language#
- CBT libraries for C/C++ Open-source C/C++ library to read and write CBT (TAR) comic book archives: libarchive. List pages in natural order, extract the cover, read ComicInfo.xml.
- CBT libraries for C# Open-source .NET libraries to read and write CBT (TAR) comic book archives: System.Formats.Tar and SharpCompress. Page order, cover and ComicInfo.xml in C#.
- CBT libraries for Java Open-source Java library to read and write CBT (TAR) comic book archives: Apache Commons Compress. Page order, cover, ComicInfo.xml and creating a CBT in Java.
- CBT libraries for Go Open-source Go library to read and write CBT (TAR) comic book archives: the standard archive/tar package. Page order, cover extraction and ComicInfo.xml in Go.
- CBT libraries for Python Open-source Python libraries to read and write CBT (TAR) comic book archives: the standard tarfile module and comicbox. Page order, cover extraction.
- CBT libraries for Ruby Open-source Ruby libraries to read and write CBT (TAR) comic book archives: minitar and ffi-libarchive. Page order, cover, ComicInfo.xml.
- CBT libraries for Rust Open-source Rust library to read and write CBT (TAR) comic book archives: the tar crate. List pages in natural order, extract the cover, read ComicInfo.xml.
- CBT libraries for PHP Open-source PHP library to read and write CBT (TAR) comic book archives: the bundled PharData class. List pages in natural order, extract the cover.