mstoykov / go-libarchive Goto Github PK
View Code? Open in Web Editor NEWlibarchive bindings for golang
License: MIT License
libarchive bindings for golang
License: MIT License
There's a fork of your work under sergeyfedotov/go-libarchive
that makes your code compatible with cgo-1.6 pointer rules. Aside from the stylistic changes (e.g., renaming things), the core of the change is that it manually manages the list of ReadSeeker
objects rather than depend on Go to manage that for it.
I've forward-ported my earlier Reader/ReadSeeker patches to his codebase, but it would be nice to see you make similar changes to your code so we can build with newer versions of Go and eliminate the reasons for multiple forks. His changes appear simple enough to backport, I just don't have time to do so right now.
Now that your upstream/origin has added a license, would you consider adding your own? I can recreate/backport your changes to make things like Read
work properly, but it'd be nice to just have them all in one spot.
I also intend to provide a PR that properly bifurcates the io.Reader
and io.ReadSeeker
interfaces, since sometimes you only have one or the other.
# ./example ../fixtures/test.7z
file ../fixtures/test.7z
Name a
panic: runtime error: slice bounds out of range
goroutine 1 [running]:
bytes.(*Buffer).ReadFrom(0xc820053e58, 0x7fa8aea9c240, 0xc8200104b0, 0x0, 0x0, 0x0)
/home/milann/go/src/bytes/buffer.go:174 +0x322
main.printContents(0x7fff96f26d0c, 0x13)
/home/milann/golang/src/github.com/MStoykov/go-libarchive/example/main.go:32 +0x713
main.main()
/home/milann/golang/src/github.com/MStoykov/go-libarchive/example/main.go:45 +0xb1
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/milann/go/src/runtime/asm_amd64.s:1805 +0x1
# ./example ../fixtures/test2.7z
file ../fixtures/test2.7z
Error on reader.Next():
libarchive: FATAL [critical error, archive closing]
# ldd ./example | grep lzma
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f9e03dc5000)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.