You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,27 @@ Currently has support for reading squashfs files and extracting files and folder
11
11
Special thanks to <https://dr-emann.github.io/squashfs/> for some VERY important information in an easy to understand format.
12
12
Thanks also to [distri's squashfs library](https://github.com/distr1/distri/tree/master/internal/squashfs) as I referenced it to figure some things out (and double check others).
13
13
14
+
## FUSE
15
+
16
+
As of `v1.0`, FUSE capabilities has been moved to [a separate library](https://github.com/CalebQ42/squashfuse).
17
+
14
18
## Limitations
15
19
16
-
* No Xattr parsing. This is simply because I haven't done any research on it and how to apply these in a pure go way.
20
+
* No Xattr parsing.
17
21
* Socket files are not extracted.
18
-
* From my research, it seems like a socket file would be useless if it could be created. They are still exposed when fuse mounted.
22
+
* From my research, it seems like a socket file would be useless if it could be created.
19
23
* Fifo files are ignored on `darwin`
20
24
21
25
## Issues
22
26
23
-
* Significantly slower then `unsquashfs` when extracting folders (about 5 ~ 7 times slower on a ~100MB archive using zstd compression)
27
+
* Significantly slower then `unsquashfs` when extracting folders
24
28
* This seems to be related to above along with the general optimization of `unsquashfs` and it's compression libraries.
25
-
* The larger the file's tree, the slower the extraction will be. Arch Linux's Live USB's airootfs.sfs takes ~35x longer for a full extraction.
29
+
* Times seem to be largely dependent on file tree size and compression type.
30
+
* My main testing image (~100MB) using Zstd takes about 6x longer.
31
+
* An Arch Linux airootfs image (~780MB) using XZ compression with LZMA filters takes about 32x longer.
32
+
* A Tensorflow docker image (~3.3GB) using Zstd takes about 12x longer.
33
+
34
+
Note: These numbers are using `FastOptions()`. `DefaultOptions()` takes about 2x longer.
LogOutput io.Writer//Where the verbose log should write. Defaults to os.Stdout.
13
+
LogOutput io.Writer//Where the verbose log should write.
14
14
DereferenceSymlinkbool//Replace symlinks with the target file.
15
15
UnbreakSymlinkbool//Try to make sure symlinks remain unbroken when extracted, without changing the symlink.
16
16
Verbosebool//Prints extra info to log on an error.
17
17
IgnorePermbool//Ignore file's permissions and instead use Perm.
18
18
Perm fs.FileMode//Permission to use when IgnorePerm. Defaults to 0777.
19
-
SimultaneousFilesuint16//Number of files to process in parallel. Defaults to 10.
20
-
ExtractionRoutinesuint16//Number of goroutines to use for each file's extraction. Only applies to regular files. Defaults to 10.
19
+
SimultaneousFilesuint16//Number of files to process in parallel. Default set based on runtime.NumCPU().
20
+
ExtractionRoutinesuint16//Number of goroutines to use for each file's extraction. Only applies to regular files. Default set based on runtime.NumCPU().
21
21
}
22
22
23
+
// The default extraction options.
23
24
funcDefaultOptions() *ExtractionOptions {
25
+
cores:=uint16(runtime.NumCPU() /2)
26
+
varfiles, routinesuint16
27
+
ifcores<=4 {
28
+
files=1
29
+
routines=cores
30
+
} else {
31
+
files=cores-4
32
+
routines=4
33
+
}
34
+
return&ExtractionOptions{
35
+
Perm: 0777,
36
+
SimultaneousFiles: files,
37
+
ExtractionRoutines: routines,
38
+
}
39
+
}
40
+
41
+
// Less limited default options. Can run up 2x faster than DefaultOptions.
0 commit comments