python - How to Apply Reverse Logic for Decoding? -


i'm on last part of decoding python exercise, , confusing me. encoding represents 376th 65912th word 3 chars: first char (0xfa), second ((code - 376) // 256), , third ((code - 376) % 256). for example, if code 30000, first output char 0xfa, second 0x73, , third 0xb8. (the code 376 fa 00 00.)

now here's confusion, how can interpret 0xfa 0x73 0xb8 30000? because word 30000th word dictionary. appreciated, thanks.

check first char, if 0xfa,

code = second * 256 + third + 376


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -