A quick update, as we've touched upon Evince recently.
I mentioned that we switched from using external tools for decompression to using libarchive. That's not the whole truth, as we switched to using libarchive for CBZ, CB7 and the infamous CBT, but used a copy/paste version of unarr to support RAR files, as libarchive support lacks some needed features.
We hope to eventually remove the internal copy of unarr, but, as a stop-gap, that allowed us to start supporting CBR comics out of the box, and it's always a good thing when you have one less non-free package to grab from somewhere to access your media.
The second new format is really two formats, from either side of the 2-digit-year divide: PostScript-based Adobe Illustrator and PDF-based Adobe Illustrator. Evince now declares to support "the format" if both of the backends are built and supported. It only took 12 years, and somebody stumbling upon the feature request while doing bug triaging. The nooks and crannies of free software where the easy feature requests get lost :)
Both features will appear in GNOME 3.26, the out-of-the-box CBR support is however available now in an update for the just released Fedora 26.
Showing posts with label comics. Show all posts
Showing posts with label comics. Show all posts
Wednesday, 26 July 2017
Thursday, 19 December 2013
On the beauty of libarchive
In your applications, you might have to deal with compressed files: ISO images of installers, e-book or e-comic types based on ZIP files, video DVD images.
libarchive makes things easier by allowing you not to have to deal with external commands to extract those few files you care about.
The API feels a bit antiquated, compared to using GLib/GIO for files handling, but it's generally easier than dealing with potential security issues launching external tools, or even dealing with shell argv quoting.
Examples
totem-pl-parser uses libarchive to determine what type of video disc image are hidden inside an ISO image.
gnome-epub-thumbnailer (as well as its siblings, the Krita and OpenRaster thumbnailers I talked about more recently) uses the ZIP handling to extract particular files, and figure out which file is the cover image.
Other uses and limitations
Boxes could use libarchive to extract files from ISO images for its auto-installer, evince could use it to handle CBZ e-comics.
There's a couple of limitations though. ISO support doesn't handle UDF images (which just means weird filenames, not inaccessible files), and RAR support is still quite young.
I hope that this post can spur on bug fixes for the RAR support, new UDF support, or even a GIO-style wrapper around the library.
The upstream authors have been particularly good at fixing bugs that only showed themselves with broken files, and I'd like to thank them for their very useful work.
libarchive makes things easier by allowing you not to have to deal with external commands to extract those few files you care about.
The API feels a bit antiquated, compared to using GLib/GIO for files handling, but it's generally easier than dealing with potential security issues launching external tools, or even dealing with shell argv quoting.
Examples
totem-pl-parser uses libarchive to determine what type of video disc image are hidden inside an ISO image.
gnome-epub-thumbnailer (as well as its siblings, the Krita and OpenRaster thumbnailers I talked about more recently) uses the ZIP handling to extract particular files, and figure out which file is the cover image.
Other uses and limitations
Boxes could use libarchive to extract files from ISO images for its auto-installer, evince could use it to handle CBZ e-comics.
There's a couple of limitations though. ISO support doesn't handle UDF images (which just means weird filenames, not inaccessible files), and RAR support is still quite young.
I hope that this post can spur on bug fixes for the RAR support, new UDF support, or even a GIO-style wrapper around the library.
The upstream authors have been particularly good at fixing bugs that only showed themselves with broken files, and I'd like to thank them for their very useful work.
Labels:
comics,
development,
iso,
libarchive,
rar,
zip
Subscribe to:
Posts (Atom)
