{"id":34070963,"url":"https://github.com/beakerboy/ms-ovba-compression","last_synced_at":"2026-04-08T12:02:11.032Z","repository":{"id":65674901,"uuid":"597082426","full_name":"Beakerboy/MS-OVBA-Compression","owner":"Beakerboy","description":"Compress and decompress Microsoft Office VBA data streams","archived":false,"fork":false,"pushed_at":"2026-03-23T13:20:28.000Z","size":53,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-23T20:06:55.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Beakerboy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-03T15:36:14.000Z","updated_at":"2026-03-23T00:39:38.000Z","dependencies_parsed_at":"2024-11-12T17:18:34.217Z","dependency_job_id":"d704c9e4-8643-4112-965f-196040f89700","html_url":"https://github.com/Beakerboy/MS-OVBA-Compression","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"8c7815506878433b9aee4f232bcfb83975e7e0c2"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Beakerboy/MS-OVBA-Compression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beakerboy%2FMS-OVBA-Compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beakerboy%2FMS-OVBA-Compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beakerboy%2FMS-OVBA-Compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beakerboy%2FMS-OVBA-Compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beakerboy","download_url":"https://codeload.github.com/Beakerboy/MS-OVBA-Compression/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beakerboy%2FMS-OVBA-Compression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-12-14T07:43:19.583Z","updated_at":"2026-04-08T12:02:10.937Z","avatar_url":"https://github.com/Beakerboy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/Beakerboy/MS-OVBA-Compression/badge.png?branch=main)](https://coveralls.io/github/Beakerboy/MS-OVBA-Compression?branch=main) ![Build Status](https://github.com/Beakerboy/MS-OVBA-Compression/actions/workflows/python-package.yml/badge.svg)\n# MS-OVBA-Compression\n\nCompress or decompress data streams using the MS-OVBA compression algorithm\n\nMicrosoft Office files are zip archives that contain a variety of files that work together. One of these files is vbaProject.bin, a binary OLE container which includes\nany VBA source code in the project. The VBA sources are compressed using the MS-OVBA compression algorithm.\n\nIt's worth noting that the compressed output may differ between this and a Microsoft Office applcation. The way the compression algorithm works, multiple valid\ncompressed byte seqences are able to be decompressed into the same uncompressed stream. This project follows the algorithm documented in the \n[MS-OVBA specification](https://interoperability.blob.core.windows.net/files/MS-OVBA/%5bMS-OVBA%5d.pdf), while one of the test cases has a compressed container\nthat is slightly different than is produced using it's own documented procedure.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install MS_OVBA_Compression.\n\n```bash\npip install ms_ovba_compression\n```\n\n## Usage\nAll inputs and outputs are bytes objects. This library does not operate on files, but on compressed or uncompressed byte streams. Any raw VBA files require a certain\namount of normalization before compression. If you are interested in writing or modifying the whole OLE container, refer to\n[Beakerboy/vbaProject-Compiler](https://github.com/Beakerboy/vbaProject-Compiler).\n\n```python\nfrom ms_ovba_compression.ms_ovba import MsOvba\n\n# returns b'\\x01\\x19°\\x00abcdefgh\\x00ijklmnop\\x00qrstuv.'\ninput = b'abcdefghijklmnopqrstuv.'\nms_ovba = MsOvba()\nms_ovba.compress(input)\n\n# returns b'#aaabcdefaaaaghijaaaaaklaaamnopqaaaaaaaaaaaarstuvwxyzaaa'\nms_ovba = MsOvba()\ncompressed = b'\\x01/°\\x00#aaabcde²f\\x00paghij\\x018\\x08akl\\x000mnop\\x06q\\x02p\\x04\\x10rstuv\\x10wxyz\\x00\u003c'\nms_ovba.decompress(compressed)\n\n```\nThe objects can be initialized to indicate the endianness if the default little-endian is not desired.\n```python\n# returns b'\\x01°\\x19\\x00abcdefgh\\x00ijklmnop\\x00qrstuv.'\ninput = b'abcdefghijklmnopqrstuv.'\nms_ovba = MsOvba(\"big\")\nms_ovba.compress(input)\n\n```\n\n## Typing stubs\nThe project also includes typed stubs for mypy. These stubs are autogenerated by stubgen, so they may be incomplete. Please let me know if they do not meet your needs and I can manage them manually.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeakerboy%2Fms-ovba-compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeakerboy%2Fms-ovba-compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeakerboy%2Fms-ovba-compression/lists"}