Release 1.2.0
New Features
Array Overlap Optimization
When extending arrays, packtab now automatically detects and merges common boundary runs where all overlapping elements share the same value, reducing total array size.
Example:
Existing: [1, 2, 7, 7, 7] (3 trailing 7s)
New: [7, 7, 8, 9] (2 leading 7s)
Result: [1, 2, 7, 7, 7, 8, 9] (saved 2 elements)
Improvements
- ~60 bytes saved on HarfBuzz UCD tables
- O(N+M) linear scan - very cheap overhead
- Automatic - only triggers when beneficial (matching boundary values)
- Universal - works across all generated arrays
Technical Details
The optimization performs two linear scans from array boundaries:
- Count trailing run of value V in existing array
- Count leading run of value V in new data
- Overlap by min(trailing, leading) elements
Since the operation is done during array extension anyway, the overhead is negligible while providing measurable space savings on real-world data.
Installation
pip install --upgrade packtab