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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user