1 // Copyright 2019 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_BASE_VLQ_BASE64_H_ 6 #define V8_BASE_VLQ_BASE64_H_ 7 8 #include <stddef.h> 9 #include <stdint.h> 10 11 #include "src/base/base-export.h" 12 13 namespace v8 { 14 namespace base { 15 V8_BASE_EXPORT int8_t charToDigitDecodeForTesting(uint8_t c); 16 17 // Decodes a VLQ-Base64-encoded string into 32bit digits. A valid return value 18 // is within [-2^31+1, 2^31-1]. This function returns -2^31 19 // (std::numeric_limits<int32_t>::min()) when bad input s is passed. 20 V8_BASE_EXPORT int32_t VLQBase64Decode(const char* start, size_t sz, 21 size_t* pos); 22 } // namespace base 23 } // namespace v8 24 #endif // V8_BASE_VLQ_BASE64_H_ 25