pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Outdated OPACK docs

Open rec0de opened this issue 6 months ago • 0 comments

Hi!

The OPACK protocol description (which was super helpful to us when testing the opack parser for bytewitch, btw) does not seem to match your source code in some details:

The doc specifies length field sizes for strings or bytes as 1, 2, 3, or 4 bytes (linear progression) when the actual behaviour we observe seems to use 1, 2, 4, or 8 bytes (exponential progression).

The OPACK tests already reflect this, so I assume it's just a matter of the documentation not being entirely up to date. https://github.com/postlund/pyatv/blob/c791f4a49b30bae2e7e6017b947224d0946c4d8d/tests/support/test_opack.py#L87

Either way, thank you for the detailed protocol docs ✨

rec0de avatar Oct 23 '25 11:10 rec0de