{"id":36332969,"url":"https://github.com/erorus/db2","last_synced_at":"2026-01-11T12:01:37.125Z","repository":{"id":56979019,"uuid":"60195814","full_name":"erorus/db2","owner":"erorus","description":"DB2 Reader for World of Warcraft data files","archived":false,"fork":false,"pushed_at":"2024-01-17T17:57:09.000Z","size":118,"stargazers_count":30,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-27T14:55:23.871Z","etag":null,"topics":["db2","db2-reader","wdb6","world-of-warcraft"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erorus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-06-01T17:04:18.000Z","updated_at":"2024-05-01T00:59:38.000Z","dependencies_parsed_at":"2023-10-20T20:49:27.093Z","dependency_job_id":null,"html_url":"https://github.com/erorus/db2","commit_stats":{"total_commits":111,"total_committers":2,"mean_commits":55.5,"dds":0.009009009009009028,"last_synced_commit":"31c40e4201414112cac74bd2f74648afe9f60143"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erorus/db2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erorus%2Fdb2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erorus%2Fdb2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erorus%2Fdb2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erorus%2Fdb2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erorus","download_url":"https://codeload.github.com/erorus/db2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erorus%2Fdb2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28302009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["db2","db2-reader","wdb6","world-of-warcraft"],"created_at":"2026-01-11T12:01:31.001Z","updated_at":"2026-01-11T12:01:37.091Z","avatar_url":"https://github.com/erorus.png","language":"PHP","funding_links":["https://www.patreon.com/bePatron?u=4445407"],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/erorus/db2.svg?branch=master)](https://travis-ci.org/erorus/db2) [![Coverage Status](https://coveralls.io/repos/github/erorus/db2/badge.svg?branch=master)](https://coveralls.io/github/erorus/db2?branch=master) [![Become a Patron!](https://everynothing.net/patronButton.png)](https://www.patreon.com/bePatron?u=4445407)\n\n# DB2 Reader\n\nThis is a small library to read DB2 and ADB/DBCache files (data tables) from World of Warcraft.\n\n## Requirements\n\nThis was developed using 64-bit PHP 7. Tests are also run against PHP 5.6. 64-bit versions are recommended to support unsigned 32-bit ints and 64-bit ints.\n\nMbstring extension is required for all formats, and gmp extension is required for WDC1 support.\n\n## Usage\n\n```php\n// Instantiate an object with the path to a DB2 file.\n$db2Reader = new Reader(\"Achievement.db2\"); \n \n// Records are presented as simple arrays.\n// Some fields are, themselves, arrays of values.\n// Get individual records by ID with:\n$record = $db2Reader-\u003egetRecord(17);\n \n// Loop through records with:\nforeach ($db2Reader-\u003egenerateRecords() as $id =\u003e $record) { ... }\n \n// All valid record IDs:\n$ids = $db2Reader-\u003egetIds();\n \n// You can set field names for convenience:\n$db2Reader-\u003esetFieldNames([0 =\u003e \"name\", 1 =\u003e \"note\", ...]);\n$record = $db2Reader-\u003egetRecord(17);\nif ($record['name'] == \"...\") ...\n \n// All integers are assumed to be unsigned, but you can change that by field:\n$db2Reader-\u003esetFieldsSigned([2 =\u003e true, 7 =\u003e true]);\n$record = $db2Reader-\u003egetRecord(17);\nif ($record[2] \u003c 0) ...\n \n// You can get the calculated field types, \n// useful when dynamically creating database tables:\n$types = $db2Reader-\u003egetFieldTypes();\nif ($types['name'] == Reader::FIELD_TYPE_STRING) ...\n \n// You can load an ADB or DBCache, as long as you have its parent DB2.\n// That reader will only expose records in the Hotfix/DBCache file.\n$adbReader = $db2Reader-\u003eloadAdb(\"Achievement.adb\");\n$dbCacheReader = $db2Reader-\u003eloadDBCache(\"DBCache.bin\");\n\n// Finally, you can specify both the DB2 and the DBCache file when constructing a HotfixedReader.\n// This has the same interface as Reader, but will substitute hotfixed records when available.\n$hotReader = new HotfixedReader(\"Achievement.db2\", \"DBCache.bin\");\n```\n\nAlso check out example.php, which is what I'm using during development.\n\n## Compatibility\n\n| Version | Format | Works | Unit Tests |\n|---------|--------|-------|-------|\n| 3.x - 6.x | WDB2 | ✓ | ✓ |\n| 7.0.1 | WDB3 |  |  |\n| 7.0.3 | WDB4 |  |  |\n| 7.0.3 - 7.2.0 | WDB5 | ✓ | ✓ |\n| 7.0.3 - 7.2.0 | WCH7/8 | ✓ |  |\n| 7.2.0 - 7.3.2 | WDB6 | ✓ | ✓ |\n| 7.2.0 - ? | DBCache.bin | ✓ |  |\n| 7.3.5 | WDC1 | ✓ |  |\n| 8.0.1 | WDC2 | ✓ |  |\n| 1.13.2 | 1SLC | ✓ |  |\n| 8.1.0 - ? | WDC3 | ✓ |  |\n\nAll features of DB2 files should be supported (offset map / embedded strings, copy blocks, common blocks, pallet data, etc).\n\nEncrypted blocks are expected to be decrypted by your CASC tool before being read by this library. For blocks that cannot be decrypted (because the key is unknown, for example), your CASC tool should substitute NUL bytes for the length of the encrypted blocks. DB2Reader ignores blocks which are encrypted and are empty of data. \n\nADBs/DBCache require their counterpart DB2 file for necessary metadata, and Internet access to get field sizes via [WoWDBDefs](https://github.com/wowdev/WoWDBDefs).\n\n## Goals\n\nThis is used for The Undermine Journal ([Newsstand](https://github.com/erorus/newsstand/)) to datamine items, pets, and other entities.\n\n## Disclaimers\n\nThis work is neither endorsed by nor affiliated with Blizzard Entertainment.\n\n## Thanks\n\nMost of the file format details were found by documentation at [the WoWDev wiki](https://wowdev.wiki/DB2). Thanks to those who contribute there!\n\nThanks to [WoWDBDefs](https://github.com/wowdev/WoWDBDefs) for providing the table formats used by the game executable so we can parse hotfixes.\n\n## License\n\nCopyright 2017 Gerard Dombroski\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use these files except in compliance with the License.\nYou may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferorus%2Fdb2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferorus%2Fdb2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferorus%2Fdb2/lists"}