{"id":34924749,"url":"https://github.com/calebq42/squashfs","last_synced_at":"2025-12-26T14:21:20.997Z","repository":{"id":41956407,"uuid":"311112654","full_name":"CalebQ42/squashfs","owner":"CalebQ42","description":"A library to interact with Squashfs archives. Currently only has support for reading, but writing archives will probably come eventually.","archived":false,"fork":false,"pushed_at":"2025-06-12T05:03:59.000Z","size":15535,"stargazers_count":33,"open_issues_count":1,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-22T14:56:38.372Z","etag":null,"topics":["golang","golang-library","squashfs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CalebQ42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"CalebQ42"}},"created_at":"2020-11-08T17:06:37.000Z","updated_at":"2025-10-14T13:44:10.000Z","dependencies_parsed_at":"2025-02-27T15:15:36.621Z","dependency_job_id":"aee3d4f8-260d-4e0a-a297-a9351804b070","html_url":"https://github.com/CalebQ42/squashfs","commit_stats":null,"previous_names":["calebq42/gosquashfs"],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/CalebQ42/squashfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebQ42%2Fsquashfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebQ42%2Fsquashfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebQ42%2Fsquashfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebQ42%2Fsquashfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalebQ42","download_url":"https://codeload.github.com/CalebQ42/squashfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebQ42%2Fsquashfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28055985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","golang-library","squashfs"],"created_at":"2025-12-26T14:21:11.527Z","updated_at":"2025-12-26T14:21:20.989Z","avatar_url":"https://github.com/CalebQ42.png","language":"Go","funding_links":["https://github.com/sponsors/CalebQ42"],"categories":[],"sub_categories":[],"readme":"# squashfs\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/CalebQ42/squashfs)](https://pkg.go.dev/github.com/CalebQ42/squashfs) [![Go Report Card](https://goreportcard.com/badge/github.com/CalebQ42/squashfs)](https://goreportcard.com/report/github.com/CalebQ42/squashfs)\n\nA 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).\n\nThe 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.\n\nCurrently has support for reading squashfs files and extracting files and folders.\n\nSpecial thanks to \u003chttps://dr-emann.github.io/squashfs/\u003e for some VERY important information in an easy to understand format.\nThanks 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).\n\n## Build tags\n\nAs of `v1.1.0` this library has two optional build tags: `no_gpl` and `no_obsolete`. `no_gpl` disables the ability to read archives with lzo compression due to the library's gpl license. `no_obsolete` removes \"obsolete\" compression types for a reduced compilation size; currently this only disable lzma compression since it's superseded by xz.\n\n## FUSE\n\nAs of `v1.0`, FUSE capabilities has been moved to [a separate library](https://github.com/CalebQ42/squashfuse).\n\n## Limitations\n\n* No Xattr parsing.\n* Socket files are not extracted.\n  * From my research, it seems like a socket file would be useless if it could be created.\n* Fifo files are ignored on `darwin`\n\n## Issues\n\n* Noticably slower then `unsquashfs` for extraction, especially on larger images.\n  * This seems to be related to above along with the general optimization of `unsquashfs` and it's compression libraries.\n  * Times seem to be largely dependent on file tree size and compression type.\n    * My main testing image (~100MB) using Zstd takes ~2x longer.\n    * An Arch Linux airootfs image (~780MB) using XZ compression with LZMA filters takes ~28x longer.\n    * A Tensorflow docker image (~3.3GB) using Zstd takes ~3x longer.\n\nNote: These numbers are using `FastOptions()`. `DefaultOptions()` takes ~2x longer.\n\n## Recommendations on Usage\n\nDue to the above performance consideration, this library should only be used to access files within the archive without extraction, or to mount it via Fuse.\n\n* Neither of these use cases are largely effected by the issue above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebq42%2Fsquashfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebq42%2Fsquashfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebq42%2Fsquashfs/lists"}