xmhuffman
Cython bindings for Microsoft xVelocity/Vertipaq canonical-Huffman string decoding
Decision gist · record as of 2026-08-14
Yes, if you need to extract or analyze data from Power BI `.pbix` files or Excel Power Pivot workbooks. The package solves a specific, narrow problem—Vertipaq Huffman decompression—with no dependencies and prebuilt wheels for common platforms. It is actively maintained, MIT-licensed, and offers substantial performance gains on real workloads. Install only if you are working with these Microsoft formats; it has no utility for general-purpose Huffman decoding or other compression tasks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python ≥ 3.8; building from source requires a C compiler and Cython ≥ 3.0.
- Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9, 3.10, 3.11, 3.12 on macOS, Linux (x86_64 and aarch64), and Windows.
- Building from source requires a C compiler and Cython ≥ 3.0.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-05-15 (91 days) · last repo commit 2026-05-15
0 known vulnerabilities (OSV.dev, 2026-08-14) · 105,805 downloads/mo, #12,678 on PyPI
Alternatives
Verify before relying
import xmhuffman
# Decode a Vertipaq dictionary page
strings = xmhuffman.decode_page(
bitstream, # compressed_string_buffer (bytes)
encode_array_128, # 128-byte nibble-packed code-length array
offsets, # per-string start bit offsets
total_bits, # store_total_bits (end of last string)
swap=True # apply byte-pair swap inside extension
)
# Output: list[bytes]- Actual performance gains on real-world `.pbix` files beyond the benchmark examples provided.
- Thread-safety guarantees and behavior under high concurrent load in production scenarios.
- Compatibility with Python versions beyond those with prebuilt wheels.
What it is and what it does
xmhuffman is a Cython extension that decodes the canonical-Huffman compressed string dictionaries stored inside Power BI `.pbix` files and Excel Power Pivot workbooks. These files use the xVelocity/Vertipaq column-store format, which compresses string data using Huffman coding. The package provides a tight C kernel that replaces what would otherwise be a per-symbol Python loop, delivering significant performance gains on real workloads.
The library exposes a primary entry point `decode_page()` that takes a bitstream, code-length array, string offsets, and total bit count—all extracted directly from Vertipaq dictionary page metadata—and returns a list of decoded byte strings. It handles both single-charset and multi-charset pages, with optional in-extension byte-pair swapping and charset reinsertion. Lower-level helpers like `build_table()` and `decode_with_table()` allow amortization across multiple pages. No runtime dependencies; zero external imports required.
Use it for
- Extract and analyze data from Power BI `.pbix` files by decompressing the embedded Vertipaq string dictionaries.
- Parse Excel Power Pivot workbooks (`xl/model/item.data`) to recover the original string values from compressed storage.
- Build tools that inspect or transform Power BI data models without opening Power BI Desktop.
- Parallelize large-scale `.pbix` extraction using `concurrent.futures.ThreadPoolExecutor` with per-page decoding.
- Reverse-engineer or audit the string content of Power BI reports for compliance or data discovery.
- Integrate Huffman decompression into data pipeline tools that consume Power BI artifacts.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to extract or analyze data from Power BI `.pbix` files or Excel Power Pivot workbooks.
The package solves a specific, narrow problem—Vertipaq Huffman decompression—with no dependencies and prebuilt wheels for common platforms. It is actively maintained, MIT-licensed, and offers substantial performance gains on real workloads. Install only if you are working with these Microsoft formats; it has no utility for general-purpose Huffman decoding or other compression tasks.
Install
xmhuffman on PyPI
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9, 3.10, 3.11, 3.12 on macOS, Linux (x86_64 and aarch64), and Windows. Building from source requires a C compiler and Cython ≥ 3.0. Package is actively maintained with recent releases.
Requires Python ≥ 3.8; building from source requires a C compiler and Cython ≥ 3.0.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
import xmhuffman
# Decode a Vertipaq dictionary page
strings = xmhuffman.decode_page(
bitstream, # compressed_string_buffer (bytes)
encode_array_128, # 128-byte nibble-packed code-length array
offsets, # per-string start bit offsets
total_bits, # store_total_bits (end of last string)
swap=True # apply byte-pair swap inside extension
)
# Output: list[bytes]
Verify before relying
- Actual performance gains on real-world `.pbix` files beyond the benchmark examples provided.
- Thread-safety guarantees and behavior under high concurrent load in production scenarios.
- Compatibility with Python versions beyond those with prebuilt wheels.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 91 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 105,805 / month, #12,678 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules |
Evidence: xmhuffman-0.3.0-cp310-cp310-macosx_11_0_universal2.whl; xmhuffman-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; xmhuffman-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; xmhuffman-0.3.0-cp310-cp310-win_amd64.whl; xmhuffman-0.3.0-cp311-cp311-macosx_11_0_universal2.whl; xmhuffman-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; xmhuffman-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; xmhuffman-0.3.0-cp311-cp311-win_amd64.whl; xmhuffman-0.3.0-cp312-cp312-macosx_11_0_universal2.whl; xmhuffman-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; xmhuffman-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; xmhuffman-0.3.0-cp312-cp312-win_amd64.whl; xmhuffman-0.3.0-cp313-cp313-macosx_11_0_universal2.whl; xmhuffman-0.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; xmhuffman-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; xmhuffman-0.3.0-cp313-cp313-win_amd64.whl; xmhuffman-0.3.0-cp39-cp39-macosx_11_0_universal2.whl; xmhuffman-0.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; xmhuffman-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; xmhuffman-0.3.0-cp39-cp39-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “power bi pbix huffman decoder”
- xmhuffmanDecodes canonical-Huffman compressed string dictionaries from…
- pbixrayParse and extract metadata, tables, DAX expressions, Power Query…
- xpress8xpress8 provides Python bindings to Microsoft's Xpress8 compression…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pbixray · xpress8 · cobs · semantic-link-sempy · semantic-link-labs · semantic-link · xpress9 · RoffIO · python-lzf · x690