{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/13"}],"enrichment":{"capability":"A C-accelerated implementation of the bitstruct library that packs and unpacks binary data into Python objects with significantly higher performance than the pure-Python original.","skillfed_tags":["binary-serialization","performance-critical","c-extension"],"use_cases":["Parsing binary network protocols or packet formats where speed matters and fields fit within 64 bits.","Serializing structured data into compact binary form for storage or transmission in latency-sensitive applications.","Unpacking embedded device telemetry or sensor data streams with high throughput requirements.","Building compiled format objects for repeated pack/unpack cycles in tight loops.","Migrating performance-critical bitstruct code to C acceleration without rewriting the logic."],"what_it_does":"cbitstruct is a C-based reimplementation of the bitstruct library, designed to parse and serialize binary data (bit fields, packed structs, protocol messages) much faster than the pure-Python version. It provides the same API\u2014pack, unpack, pack_into, unpack_from, and compiled format objects\u2014so you can often swap it in as a drop-in replacement by changing the import statement.\n\nThe tradeoff is that cbitstruct has real limitations: fields are capped at 64 bits (except padding), it only runs on CPython, error messages are less helpful, and it may not work on big-endian systems. The description notes that exceptions differ from bitstruct and some limitations are unlikely to be lifted. It's best suited for performance-critical code paths where you're already familiar with bitstruct and need the speed boost.","worth_installing":"Yes, if you are already using bitstruct and have identified bit packing/unpacking as a bottleneck in a CPython application on x86_64 Linux. The performance gains are substantial, and the API compatibility makes migration straightforward. No, if you need portability to other architectures, big-endian systems, or non-CPython implementations, or if you require clear error messages and full bitstruct feature parity. The copyleft license (MPL-2.0) also requires careful review if you plan to distribute derived works."},"id":"cbitstruct","links":{"html":"https://skillfed.io/packages/cbitstruct","md":"https://skillfed.io/packages/cbitstruct.md","pypi":"https://pypi.org/project/cbitstruct/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2026-02-09","license_spdx":null,"license_treatment":"copyleft","name":"cbitstruct","python_support":"supports_current","summary":"Faster C implementation of bitstruct"},"popularity":{"monthly_downloads":223422,"position":9245,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.0"}
