{"id":15517540,"url":"https://github.com/bodgit/wud","last_synced_at":"2026-03-14T02:32:32.752Z","repository":{"id":57641772,"uuid":"387922599","full_name":"bodgit/wud","owner":"bodgit","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-06T13:03:40.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T22:51:19.910Z","etag":null,"topics":["go","golang","nintendo","wii-u","wiiu"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodgit.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":null,"support":null}},"created_at":"2021-07-20T21:55:01.000Z","updated_at":"2023-07-26T01:10:32.000Z","dependencies_parsed_at":"2023-02-19T07:46:05.819Z","dependency_job_id":null,"html_url":"https://github.com/bodgit/wud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fwud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fwud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fwud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fwud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodgit","download_url":"https://codeload.github.com/bodgit/wud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248327860,"owners_count":21085258,"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":["go","golang","nintendo","wii-u","wiiu"],"created_at":"2024-10-02T10:13:43.949Z","updated_at":"2026-03-14T02:32:32.719Z","avatar_url":"https://github.com/bodgit.png","language":"Go","readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/bodgit/wud)](https://goreportcard.com/report/github.com/bodgit/wud)\n[![GoDoc](https://godoc.org/github.com/bodgit/wud?status.svg)](https://godoc.org/github.com/bodgit/wud)\n![Go version](https://img.shields.io/badge/Go-1.17-brightgreen.svg)\n![Go version](https://img.shields.io/badge/Go-1.16-brightgreen.svg)\n\n# Nintendo Wii-U disc images\n\nThe [github.com/bodgit/wud](https://godoc.org/github.com/bodgit/wud) package\nprovides read access to Wii-U disc images, such as those created by the\n[github.com/FIX94/wudump](https://github.com/FIX94/wudump) homebrew.\n\nHow to read a disc image:\n\n```golang\npackage main\n\nimport (\n        \"io\"\n        \"os\"\n\n        \"github.com/bodgit/wud\"\n        \"github.com/bodgit/wud/wux\"\n        \"github.com/hashicorp/go-multierror\"\n)\n\n// openFile will first try and open name as a compressed image, then as\n// a regular or split image.\nfunc openFile(name string) (wud.ReadCloser, error) {\n        f, err := os.Open(name)\n        if err != nil {\n                return nil, err\n        }\n\n        if rc, err := wux.NewReadCloser(f); err != nil {\n                if err != wux.ErrBadMagic {\n                        return nil, multierror.Append(err, f.Close())\n                }\n                if err = f.Close(); err != nil {\n                        return nil, err\n                }\n        } else {\n                return rc, nil\n        }\n\n        return wud.OpenReader(name)\n}\n\nfunc main() {\n        rc, err := openFile(os.Args[1])\n        if err != nil {\n                panic(err)\n        }\n        defer rc.Close()\n\n        commonKey, err := os.ReadFile(os.Args[2])\n        if err != nil {\n                panic(err)\n        }\n\n        gameKey, err := os.ReadFile(os.Args[3])\n        if err != nil {\n                panic(err)\n        }\n\n        w, err := wud.NewWUD(rc, commonKey, gameKey)\n        if err != nil {\n                panic(err)\n        }\n\n        if err = w.Extract(os.Args[4]); err != nil {\n                panic(err)\n        }\n}\n```\n\nTo compress a disc image:\n\n```golang\npackage main\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/bodgit/wud\"\n\t\"github.com/bodgit/wud/wux\"\n)\n\nfunc main() {\n\trc, err := wud.OpenReader(os.Args[1])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer rc.Close()\n\n\tf, err := os.Create(os.Args[2])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer f.Close()\n\n\tw, err := wux.NewWriter(f, wud.SectorSize, wud.UncompressedSize)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif _, err = io.Copy(w, r); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\nAnd the reverse decompression operation:\n\n```golang\npackage main\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/bodgit/wud/wux\"\n)\n\nfunc main() {\n\tf, err := os.Open(os.Args[1])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer f.Close()\n\n\tr, err := wux.NewReader(f)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tw, err := os.Create(os.Args[2])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer w.Close()\n\n\tif _, err = io.Copy(w, r); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fwud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodgit%2Fwud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fwud/lists"}