{"id":21560428,"url":"https://github.com/icza/mpq","last_synced_at":"2025-04-10T11:52:24.630Z","repository":{"id":144203719,"uuid":"64128299","full_name":"icza/mpq","owner":"icza","description":"Decoder/parser of Blizzard's MPQ archive file format","archived":false,"fork":false,"pushed_at":"2023-03-30T13:28:46.000Z","size":785,"stargazers_count":34,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T10:45:46.366Z","etag":null,"topics":["blizzard","decoder","mpq-archives","parse"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icza.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},"funding":{"github":"icza"}},"created_at":"2016-07-25T11:17:40.000Z","updated_at":"2024-12-19T05:28:34.000Z","dependencies_parsed_at":"2023-06-19T03:54:38.421Z","dependency_job_id":null,"html_url":"https://github.com/icza/mpq","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/icza%2Fmpq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icza%2Fmpq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icza%2Fmpq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icza%2Fmpq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icza","download_url":"https://codeload.github.com/icza/mpq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248215192,"owners_count":21066622,"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":["blizzard","decoder","mpq-archives","parse"],"created_at":"2024-11-24T09:14:32.535Z","updated_at":"2025-04-10T11:52:24.611Z","avatar_url":"https://github.com/icza.png","language":"Go","funding_links":["https://github.com/sponsors/icza"],"categories":[],"sub_categories":[],"readme":"# mpq\n\n![Build Status](https://github.com/icza/mpq/actions/workflows/go.yml/badge.svg)\n[![Go Reference](https://pkg.go.dev/badge/github.com/icza/mpq.svg)](https://pkg.go.dev/github.com/icza/mpq)\n[![Go Report Card](https://goreportcard.com/badge/github.com/icza/mpq)](https://goreportcard.com/report/github.com/icza/mpq)\n[![codecov](https://codecov.io/gh/icza/mpq/branch/master/graph/badge.svg)](https://codecov.io/gh/icza/mpq)\n\nPackage `mpq` is a decoder/parser of Blizzard's MPQ archive file format.\n\nThis is not a full MPQ implementation. It is primarily intended to parse StarCraft II replay files (`*.SC2Replay`),\nbut that is fully supported.\n\n## Usage\n\nUsage is simple. Opening an MPQ archive file:\n\n\tm, err := mpq.NewFromFile(\"myreplay.SC2Replay\")\n\tif err != nil {\n\t\t// Handle error\n\t\treturn\n\t}\n\tdefer m.Close()\n\nGetting a named file from the archive:\n\n\t// Access a file inside the MPQ archive.\n\t// Usually there is a file called \"(listfile)\" containing the list of other files:\n\tif data, err := m.FileByName(\"(listfile)\"); err == nil {\n\t\tfmt.Println(\"Files inside archive:\")\n\t\tfmt.Println(string(data))\n\t} else {\n\t\t// handle error\n\t}\n\nIf you already have the MPQ data in memory:\n\n\tmpqdata := []byte{} // MPQ data in memory\n\tm, err := mpq.New(bytes.NewReader(mpqdata)))\n\n## Information sources\n\n- The_MoPaQ_Archive_Format: http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format\n- MPQ on wikipedia: http://en.wikipedia.org/wiki/MPQ\n- Zezula MPQ description: http://www.zezula.net/mpq.html\n- Stormlib: https://github.com/ladislav-zezula/StormLib\n- Libmpq project: https://github.com/ge0rg/libmpq (old: https://libmpq.org/)\n- MPQ parser of the Scelight project: https://github.com/icza/scelight/tree/master/src-app-libs/hu/belicza/andras/mpq\n\n## Example projects using this\n\n- https://github.com/icza/s2prot\n\n## License\n\nOpen-sourced under the [Apache License 2.0](https://github.com/icza/mpq/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficza%2Fmpq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficza%2Fmpq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficza%2Fmpq/lists"}