{"id":13413531,"url":"https://github.com/ulikunitz/xz","last_synced_at":"2025-05-13T20:18:50.732Z","repository":{"id":19744174,"uuid":"23000858","full_name":"ulikunitz/xz","owner":"ulikunitz","description":"Pure golang package for reading and writing xz-compressed files","archived":false,"fork":false,"pushed_at":"2025-02-27T20:31:14.000Z","size":20445,"stargazers_count":507,"open_issues_count":17,"forks_count":45,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-28T11:55:02.505Z","etag":null,"topics":["compression","decompression","go","xz"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ulikunitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-15T19:41:21.000Z","updated_at":"2025-04-27T11:17:41.000Z","dependencies_parsed_at":"2023-01-14T09:15:18.673Z","dependency_job_id":"34bb9aff-cb1d-48d9-bd96-3025db18c750","html_url":"https://github.com/ulikunitz/xz","commit_stats":{"total_commits":1139,"total_committers":8,"mean_commits":142.375,"dds":0.5776997366110623,"last_synced_commit":"4f11dce79b9977ec2976a978d6c594ea1c23cf29"},"previous_names":["uli-go/xz"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulikunitz%2Fxz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulikunitz%2Fxz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulikunitz%2Fxz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulikunitz%2Fxz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ulikunitz","download_url":"https://codeload.github.com/ulikunitz/xz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569008,"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":["compression","decompression","go","xz"],"created_at":"2024-07-30T20:01:42.541Z","updated_at":"2025-04-28T11:55:23.214Z","avatar_url":"https://github.com/ulikunitz.png","language":"Go","readme":"# Package xz\n\nThis Go language package supports the reading and writing of xz\ncompressed streams. It includes also a gxz command for compressing and\ndecompressing data. The package is completely written in Go and doesn't\nhave any dependency on any C code.\n\nThe package is currently under development. There might be bugs and APIs\nare not considered stable. At this time the package cannot compete with\nthe xz tool regarding compression speed and size. The algorithms there\nhave been developed over a long time and are highly optimized. However\nthere are a number of improvements planned and I'm very optimistic about\nparallel compression and decompression. Stay tuned!\n\n## Using the API\n\nThe following example program shows how to use the API.\n\n```go\npackage main\n\nimport (\n    \"bytes\"\n    \"io\"\n    \"log\"\n    \"os\"\n\n    \"github.com/ulikunitz/xz\"\n)\n\nfunc main() {\n    const text = \"The quick brown fox jumps over the lazy dog.\\n\"\n    var buf bytes.Buffer\n    // compress text\n    w, err := xz.NewWriter(\u0026buf)\n    if err != nil {\n        log.Fatalf(\"xz.NewWriter error %s\", err)\n    }\n    if _, err := io.WriteString(w, text); err != nil {\n        log.Fatalf(\"WriteString error %s\", err)\n    }\n    if err := w.Close(); err != nil {\n        log.Fatalf(\"w.Close error %s\", err)\n    }\n    // decompress buffer and write output to stdout\n    r, err := xz.NewReader(\u0026buf)\n    if err != nil {\n        log.Fatalf(\"NewReader error %s\", err)\n    }\n    if _, err = io.Copy(os.Stdout, r); err != nil {\n        log.Fatalf(\"io.Copy error %s\", err)\n    }\n}\n```\n\n## Documentation\n\nYou can find the full documentation at [pkg.go.dev](https://pkg.go.dev/github.com/ulikunitz/xz).\n\n## Using the gxz compression tool\n\nThe package includes a gxz command line utility for compression and\ndecompression.\n\nUse following command for installation:\n\n    $ go get github.com/ulikunitz/xz/cmd/gxz\n\nTo test it call the following command.\n\n    $ gxz bigfile\n\nAfter some time a much smaller file bigfile.xz will replace bigfile.\nTo decompress it use the following command.\n\n    $ gxz -d bigfile.xz\n\n## Security \u0026 Vulnerabilities\n\nThe security policy is documented in [SECURITY.md](SECURITY.md). \n\nThe software is not affected by the supply chain attack on the original xz\nimplementation, [CVE-2024-3094](https://nvd.nist.gov/vuln/detail/CVE-2024-3094).\nThis implementation doesn't share any files with the original xz implementation\nand no patches or pull requests are accepted without a review.\n\nAll security advisories for this project are published under\n[github.com/ulikunitz/xz/security/advisories](https://github.com/ulikunitz/xz/security/advisories?state=published).\n","funding_links":[],"categories":["开源类库","Go","Miscellaneous","Microsoft Office","杂项"],"sub_categories":["解压缩","Uncategorized","未分类的"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulikunitz%2Fxz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulikunitz%2Fxz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulikunitz%2Fxz/lists"}