| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/node-sass/src/libsass/src/ |
Upload File : |
#include "sass.hpp"
#include "base64vlq.hpp"
namespace Sass {
std::string Base64VLQ::encode(const int number) const
{
std::string encoded = "";
int vlq = to_vlq_signed(number);
do {
int digit = vlq & VLQ_BASE_MASK;
vlq >>= VLQ_BASE_SHIFT;
if (vlq > 0) {
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64_encode(digit);
} while (vlq > 0);
return encoded;
}
char Base64VLQ::base64_encode(const int number) const
{
int index = number;
if (index < 0) index = 0;
if (index > 63) index = 63;
return CHARACTERS[index];
}
int Base64VLQ::to_vlq_signed(const int number) const
{
return (number < 0) ? ((-number) << 1) + 1 : (number << 1) + 0;
}
const char* Base64VLQ::CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const int Base64VLQ::VLQ_BASE_SHIFT = 5;
const int Base64VLQ::VLQ_BASE = 1 << VLQ_BASE_SHIFT;
const int Base64VLQ::VLQ_BASE_MASK = VLQ_BASE - 1;
const int Base64VLQ::VLQ_CONTINUATION_BIT = VLQ_BASE;
}