Subdomain Posts
C# | 5 hours ago
C# | 6 hours ago
C# | 9 hours ago
C# | 10 hours ago
C# | 11 hours ago
C# | 11 hours ago
None | 13 hours ago
C# | 14 hours ago
C# | 14 hours ago
C# | 14 hours ago
Recent Posts
JavaScript | 15 sec ago
None | 19 sec ago
Diff | 28 sec ago
None | 34 sec ago
None | 38 sec ago
C++ | 1 min ago
None | 1 min ago
C | 1 min ago
None | 2 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 8th of Feb 2010 07:12:26 PM Download | Raw | Embed | Report
  1.         public int decodeVL64L64(string data)
  2.         {
  3.             return decodeVL64L64(data.ToCharArray());
  4.         }
  5.                
  6.                 public int decodeVL64L64(char[] raw)
  7.         {
  8.             int position = 0;
  9.             int VL64 = 0;
  10.             bool negative = (raw[position] & 4) == 4;
  11.             int totalBytes = raw[position] >> 3 & 7;
  12.             VL64 = raw[position] & 3;
  13.             position++;
  14.             int shiftAmount = 2;
  15.                        
  16.             for (int j = 1; j < totalBytes; j++)
  17.             {
  18.                 VL64 |= (raw[position] & 0x3f) << shiftAmount;
  19.                 shiftAmount = 2 + 6 * j;
  20.                 position++;
  21.             }
  22.  
  23.             if (negative == true)
  24.                 VL64 *= -1;
  25.             return VL64;
  26.         }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: