Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / @protobufjs / base64 / index.d.ts
diff --git a/legacy-libs/@protobufjs/base64/index.d.ts b/legacy-libs/@protobufjs/base64/index.d.ts
new file mode 100644 (file)
index 0000000..16fd7db
--- /dev/null
@@ -0,0 +1,32 @@
+/**\r
+ * Calculates the byte length of a base64 encoded string.\r
+ * @param {string} string Base64 encoded string\r
+ * @returns {number} Byte length\r
+ */\r
+export function length(string: string): number;\r
+\r
+/**\r
+ * Encodes a buffer to a base64 encoded string.\r
+ * @param {Uint8Array} buffer Source buffer\r
+ * @param {number} start Source start\r
+ * @param {number} end Source end\r
+ * @returns {string} Base64 encoded string\r
+ */\r
+export function encode(buffer: Uint8Array, start: number, end: number): string;\r
+\r
+/**\r
+ * Decodes a base64 encoded string to a buffer.\r
+ * @param {string} string Source string\r
+ * @param {Uint8Array} buffer Destination buffer\r
+ * @param {number} offset Destination offset\r
+ * @returns {number} Number of bytes written\r
+ * @throws {Error} If encoding is invalid\r
+ */\r
+export function decode(string: string, buffer: Uint8Array, offset: number): number;\r
+\r
+/**\r
+ * Tests if the specified string appears to be base64 encoded.\r
+ * @param {string} string String to test\r
+ * @returns {boolean} `true` if it appears to be base64 encoded, otherwise false\r
+ */\r
+export function test(string: string): boolean;\r