copy from https://github.com/yyq2013/asar
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
兔子 f3062b422e | 2 years ago | |
---|---|---|
cmd/asar | 2 years ago | |
testdata | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
builder.go | 2 years ago | |
decoder.go | 2 years ago | |
decoder_test.go | 2 years ago | |
doc.go | 2 years ago | |
encoder.go | 2 years ago | |
encoder_test.go | 2 years ago | |
entry.go | 2 years ago | |
go.mod | 2 years ago | |
header.go | 2 years ago |
README.md
asar
Package asar reads and writes ASAR (Atom-Shell Archive) archives
import (
"os"
"layeh.com/asar"
)
f, err := os.Open("sample.asar")
if err != nil {
panic(err)
}
defer f.Close()
archive, err := asar.Decode(f)
if err != nil {
panic(err)
}
test := archive.Find("test", "file.txt")
if test == nil {
panic("file not found")
}
// print contents of test/file.txt in sample.asar
fmt.Println(test.String())
License
MPL 2.0
Author
Tim Cooper (tim.cooper@layeh.com)