Advertisement
amgineyoc

Untitled

Aug 31st, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. unsigned int i = 0;
  2. while ((i < size) && (offset < len))
  3. {
  4.     c = cBuffer[offset++];
  5.     *(cOut + nOut++) = (table[(c & 0xF0U) >> 4]);  // add 1 byte for sure
  6.  
  7.     if (table[c & 0x0FU] != 0) // if table is 0 ?! it jump a byte.. ._.
  8.     {
  9.         *(cOut + nOut++) = table[c & 0x0FU];
  10.     }
  11.  
  12.     i += 2; // increment 2 also if the second byte isn't added..
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement