|
2 | 2 |
|
3 | 3 | [](https://pkg.go.dev/github.com/CalebQ42/squashfs) [](https://goreportcard.com/report/github.com/CalebQ42/squashfs)
|
4 | 4 |
|
5 |
| -A PURE Go library to read squashfs. There is currently no plans to add archive creation support as it will almost always be better to just call `mksquashfs`. I could see some possible use cases, but probably won't spend time on it unless it's requested (open a discussion fi you want this feature). |
| 5 | +A PURE Go library to read squashfs. There is currently no plans to add archive creation support as it will almost always be better to just call `mksquashfs`. I could see some possible use cases, but probably won't spend time on it unless it's requested (open a discussion if you want this feature). |
| 6 | + |
| 7 | +The library has two parts with this `github.com/CalebQ42/squashfs` being easy to use as it implements `io/fs` interfaces and doesn't expose unnecessary information. 95% this is the library you want. If you need lower level access to the information, use `github.com/CalebQ42/squashfs/low` where far more information is exposed. |
6 | 8 |
|
7 | 9 | Currently has support for reading squashfs files and extracting files and folders.
|
8 | 10 |
|
9 | 11 | Special thanks to <https://dr-emann.github.io/squashfs/> for some VERY important information in an easy to understand format.
|
10 | 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).
|
11 | 13 |
|
12 |
| -## [TODO](https://github.com/CalebQ42/squashfs/projects/1?fullscreen=true) |
| 14 | +## FUSE |
| 15 | + |
| 16 | +As of `v1.0`, FUSE capabilities has been moved to [a separate library](https://github.com/CalebQ42/squashfuse). |
13 | 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 | 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. |
26 | 35 |
|
27 | 36 | ## Recommendations on Usage
|
28 | 37 |
|
|
0 commit comments