Some more work on ExtractTo

Added Xz compression support
Started testing using a big squashfs fil (particularly the squashfs from an Arch Linux install img)
This commit is contained in:
Caleb Gardner
2020-11-30 03:53:57 -06:00
parent 508a33b323
commit c5c6291643
7 changed files with 156 additions and 31 deletions
+3 -1
View File
@@ -47,6 +47,8 @@ func NewSquashfsReader(r io.ReaderAt) (*Reader, error) {
switch rdr.super.CompressionType {
case gzipCompression:
rdr.decompressor = &compression.Zlib{}
case xzCompression:
rdr.decompressor = &compression.Xz{}
default:
return nil, errIncompatibleCompression
}
@@ -81,7 +83,7 @@ func (r *Reader) GetRootFolder() (root *File, err error) {
if err != nil {
return nil, err
}
root.Path = "/"
root.path = "/"
root.filType = root.in.Type
root.r = r
return root, nil