Code Monkey home page Code Monkey logo

go-libarchive's People

Contributors

gen2brain avatar mstoykov avatar rbcrwd avatar vbatts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-libarchive's Issues

cgo-1.6 compat

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.

License

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.

7z doesn't work

# ./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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.