CBR libraries for Go
Both options are pure Go (no cgo) and read RAR4 and RAR5:
- rardecode (
github.com/nwaples/rardecode/v2) is the RAR decoder itself. ItsReaderstreams entries in archive order, which works for every archive; itsfs.FS(OpenFS) can’t open files inside solid archives except the first. - archives (
github.com/mholt/archives) wraps rardecode, bodgit/sevenzip and the standard library behind onefs.FS. It reads solid RAR too, and the same code opens CBZ and CB7.
Neither writes RAR. Write converted comics as CBZ with archive/zip.
- archives Read CBR comic book archives in Go with mholt/archives: open the RAR file as an fs.FS, list pages in natural order, extract the cover, read ComicInfo.xml.
- rardecode Read CBR comic book archives in Go with nwaples/rardecode: pure Go RAR4 and RAR5 decoder. List pages in natural order, extract the cover, read ComicInfo.xml.