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...
By Anonymous on the 8th of Feb 2010 07:12:26 PM
Download |
Raw |
Embed |
Report
public int decodeVL64L64(string data)
{
return decodeVL64L64(data.ToCharArray());
}
public int decodeVL64L64(char[] raw)
{
int position = 0;
int VL64 = 0;
bool negative = (raw[position] & 4) == 4;
int totalBytes = raw[position] >> 3 & 7;
VL64 = raw[position] & 3;
position++;
int shiftAmount = 2;
for (int j = 1; j < totalBytes; j++)
{
VL64 |= (raw[position] & 0x3f) << shiftAmount;
shiftAmount = 2 + 6 * j;
position++;
}
if (negative == true)
VL64 *= -1;
return VL64;
}
Submit a correction or amendment below.
Make A New Post