• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <string>
9 
10 #include "src/base/base-export.h"
11 
12 namespace v8 {
13 namespace base {
14 V8_BASE_EXPORT int8_t charToDigitDecodeForTesting(uint8_t c);
15 
16 // Decodes a VLQ-Base64-encoded string into 32bit digits. A valid return value
17 // is within [-2^31+1, 2^31-1]. This function returns -2^31
18 // (std::numeric_limits<int32_t>::min()) when bad input s is passed.
19 V8_BASE_EXPORT int32_t VLQBase64Decode(const char* start, size_t sz,
20                                        size_t* pos);
21 }  // namespace base
22 }  // namespace v8
23 #endif  // V8_BASE_VLQ_BASE64_H_
24