All formats

CBT libraries for C/C++

libarchive is the standard TAR library for C: it’s the engine of bsdtar, handles ustar, pax and GNU variants, and opens CBZ, CBR and CB7 with the same code. BSD-2-Clause.

The TAR format is simple enough that some readers parse it directly: 512-byte headers with octal ASCII sizes, data padded to 512 bytes (see the CBT format page). A hand-written reader must still handle pax x headers and GNU L long names to get correct file names.