Research Article
Efficient Payload Compression in IP-based Wireless Sensor Network: Algorithmic Analysis and Implementation
Algorithm 1
Encoding in arithmetic algorithm.
| Initialize and using the following. | | * | | ** | | While (MSB of and are both equal to or E3 condition holds) | | if (MSB of and are both equal to ) | | { | | Send | | Shift to the left by 1 bit and shift 0 into LSB | | Shift to the left by 1 bit and shift 1 into LSB | | While (Scale3>0) | | { | | Send complement of | | Decrement Scale3 | | } | | } | | if (E3 condition holds) | | { | | Shift to the left by 1 bit and shift 0 into LSB | | Shift to the left by 1 bit and shift 1 into LSB | | Complement (new) MSB of and | | Increment Scale3 | | } |
|