tags:

views:

34

answers:

0

I am trying analyze a code to parse a string which has a maximum string length of 4000 characters . The coder is using the following following formula to generate the key

(fromid^(from_id<<18)^(toid<<2)
^(toid<<16)^(repetition<<4)^(repetition<<14)^
(tbranch_id<<6)^(tbranch_id<<12)^
(fbranch_id<<8))^(fbranch_id<<10)

I cant understand the rationale behind such a formula ?