Closed adamsussman closed 12 years ago
Thanks for this high quality patch.
I wouldn't be myself if I could resist tweaking your code a bit. Please take a look: c11aaf2ee805e6f66b6011260632f4b1315becc2 and cfba40e3b2abff598477df5c0f5d07ad6107f627
Looks good. Only issue I see is that the 'bit_length' function is only available starting in python 2.7, which we aren't on yet :(
-adam
On Fri, Jun 15, 2012 at 8:03 AM, Marek Majkowski reply@reply.github.com wrote:
Thanks for this high quality patch.
I wouldn't be myself if I could resist tweaking your code a bit. Please take a look: c11aaf2ee805e6f66b6011260632f4b1315becc2 and cfba40e3b2abff598477df5c0f5d07ad6107f627
Reply to this email directly or view it on GitHub: https://github.com/majek/puka/pull/19#issuecomment-6358724
I was not aware of that. Let me use absolute values then.
Ok, here is an updated pull for the encode/decode stuff. This was done against the 0-9-1 errata as well as looking in Rabbit's internals. There is a great deal of divergence between what Rabbit does and what the 0-9-1 spec says. Also, there is some divergence between the 0-9-1 errata and Rabbit's actual implementation.
Here are the exact changes:
For encode:
Other notes on encode:
For decode: