Highlights
⚡ Faster RemoteXPC
pymobiledevice3.binary now has composable codecs (Prefixed, Aligned, PrefixedArray, Switch, Tuple, CString, …) for variable-length data, and nested reads no longer copy bytes. RemoteXPC messages are declared with them: building a message is ~30% faster and parsing ~20% faster than v11.32.0 (~6x and ~11x faster than the construct-based code before v11.32.0). Stackshot parsing is ~10% faster.
🐛 Clearer binary parse/build errors
BinaryDataError now carries the location of the failure, e.g. [30] -> STRING at offset 544: expected 100000 bytes, found 820.
⚠️ Internal API changes
The low-level helpers encode_utf8_cstring(), pad_to(), ByteReader.prefixed() and ByteReader.read_utf8_cstring() were removed; use CSTRING.build(), Aligned, Prefixed and CSTRING.read() instead (#2034). Building a TLV8 item longer than 255 bytes now raises BinaryBuildError instead of ValueError.
What's Changed
- 2597367 binary: Drop the helpers that codecs replace (#2034) (@doronz88)
- 1e8578c core_profile_session_tap: Read C strings with CString (#2034) (@doronz88)
- 805798c tunnel_service: Declare TLV8 items and tunnel packets as records (#2034) (@doronz88)
- 8217eb5 afc: Declare the fopen and make-link requests as records (#2034) (@doronz88)
- 2c06e0d remotexpc: Build the payload-to-object dispatch table once (#2034) (@doronz88)
- e422e22 remotexpc: Declare XPC objects with codecs (#2034) (@doronz88)
- 30674b5 binary: Add composable codecs for variable-length data (#2034) (@doronz88)
- 749e9a1 binary: Read nested byte ranges without copying (#2034) (@doronz88)
Full Changelog: v11.32.0...v11.33.0