{"id":16322717,"url":"https://github.com/nlepage/go-tarfs","last_synced_at":"2025-10-25T22:48:54.435Z","repository":{"id":45596841,"uuid":"335783535","full_name":"nlepage/go-tarfs","owner":"nlepage","description":"Read a tar file contents using go1.16 io/fs abstraction","archived":false,"fork":false,"pushed_at":"2023-11-20T10:31:58.000Z","size":95,"stargazers_count":36,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-11T22:52:09.527Z","etag":null,"topics":["golang","tar","tarball"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/nlepage/go-tarfs","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlepage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["nlepage"]}},"created_at":"2021-02-03T23:30:41.000Z","updated_at":"2024-07-11T21:02:55.000Z","dependencies_parsed_at":"2024-06-18T18:39:31.931Z","dependency_job_id":"70a263dc-cc09-419d-ba96-055598a75f82","html_url":"https://github.com/nlepage/go-tarfs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlepage%2Fgo-tarfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlepage%2Fgo-tarfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlepage%2Fgo-tarfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlepage%2Fgo-tarfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlepage","download_url":"https://codeload.github.com/nlepage/go-tarfs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244703914,"owners_count":20496199,"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","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","tar","tarball"],"created_at":"2024-10-10T22:52:10.485Z","updated_at":"2025-10-25T22:48:49.400Z","avatar_url":"https://github.com/nlepage.png","language":"Go","funding_links":["https://github.com/sponsors/nlepage"],"categories":[],"sub_categories":[],"readme":"# go-tarfs\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/nlepage/go-tarfs.svg)](https://pkg.go.dev/github.com/nlepage/go-tarfs)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nlepage/go-tarfs?sort=semver)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/nlepage/go-tarfs/go.yml?branch=main)\n[![License Unlicense](https://img.shields.io/github/license/nlepage/go-tarfs)](https://github.com/nlepage/go-tarfs/blob/master/LICENSE)\n\n\u003e Read a tar file contents using go1.16 io/fs abstraction\n\n## Usage\n\n⚠️ go-tarfs needs go\u003e=1.17\n\nInstall:\n\n```sh\ngo get github.com/nlepage/go-tarfs\n```\n\nUse:\n\n```go\npackage main\n\nimport (\n    \"os\"\n\n    tarfs \"github.com/nlepage/go-tarfs\"\n)\n\nfunc main() {\n    tf, err := os.Open(\"path/to/archive.tar\")\n    if err != nil {\n        panic(err)\n    }\n    defer tf.Close()\n\n    tfs, err := tarfs.New(tf)\n    if err != nil {\n        panic(err)\n    }\n\n    f, err := tfs.Open(\"path/to/some/file\")\n    if err != nil {\n        panic(err)\n    }\n    defer f.Close() // frees the associated reader\n\n    // use f...\n}\n```\n\nMore information at [pkg.go.dev/github.com/nlepage/go-tarfs](https://pkg.go.dev/github.com/nlepage/go-tarfs#section-documentation)\n\n### Long living `fs.FS`\n\nThe `io.Reader` given to `tarfs.New` must stay opened while using the returned `fs.FS` (this is true only if the `io.Reader` implements `io.ReaderAt`).\n\n### Memory usage\n\nSince [v1.2.0](https://github.com/nlepage/go-tarfs/releases/tag/v1.2.0) files content are not stored in memory anymore if the `io.Reader` given to `tarfs.New` implements `io.ReaderAt`.\n\n### Symbolic links\n\nFor now, no effort is done to support symbolic links.\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/nlepage\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/19571875?v=4?s=100\" width=\"100px;\" alt=\"Nicolas Lepage\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNicolas Lepage\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=nlepage\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=nlepage\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#example-nlepage\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#maintenance-nlepage\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/pulls?q=is%3Apr+reviewed-by%3Anlepage\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://blog.cugu.eu/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/653777?v=4?s=100\" width=\"100px;\" alt=\"Jonas Plum\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonas Plum\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=cugu\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=cugu\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ix64\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13902388?v=4?s=100\" width=\"100px;\" alt=\"MengYX\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMengYX\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nlepage/go-tarfs/issues?q=author%3Aix64\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=ix64\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/adyatlov\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1386270?v=4?s=100\" width=\"100px;\" alt=\"Andrey Dyatlov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndrey Dyatlov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nlepage/go-tarfs/issues?q=author%3Aadyatlov\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=adyatlov\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=adyatlov\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/joelanford\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/580047?v=4?s=100\" width=\"100px;\" alt=\"Joe Lanford\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJoe Lanford\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nlepage/go-tarfs/commits?author=joelanford\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/pulls?q=is%3Apr+reviewed-by%3Ajoelanford\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/nlepage/go-tarfs/issues?q=author%3Ajoelanford\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## 📝 License\n\nThis project is [unlicensed](https://github.com/nlepage/go-tarfs/blob/master/LICENSE), it is free and unencumbered software released into the public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlepage%2Fgo-tarfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlepage%2Fgo-tarfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlepage%2Fgo-tarfs/lists"}