Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic extraction of 7z files #107

Open
clin1234 opened this issue Aug 24, 2024 · 1 comment
Open

Add automatic extraction of 7z files #107

clin1234 opened this issue Aug 24, 2024 · 1 comment

Comments

@clin1234
Copy link

How much effort would be required to add 7z support, assuming Go's stdlib doesn't have it?

@dufferzafar
Copy link
Contributor

This is what we should use: https://github.com/bodgit/sevenzip

eget's code is quite clean, this is where you can start:

eget/extract.go

Lines 71 to 85 in 0983dea

gunzipper := func(r io.Reader) (io.Reader, error) {
return gzip.NewReader(r)
}
b2unzipper := func(r io.Reader) (io.Reader, error) {
return bzip2.NewReader(r), nil
}
xunzipper := func(r io.Reader) (io.Reader, error) {
return xz.NewReader(bufio.NewReader(r))
}
zstdunzipper := func(r io.Reader) (io.Reader, error) {
return zstd.NewReader(r)
}
nounzipper := func(r io.Reader) (io.Reader, error) {
return r, nil
}

Not a lot of effort - you can do it @clin1234 ! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants