/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { IsoBufferConstructor, IsoBufferEncoding, IsoBuffer as IsoBufferInterface } from "./buffer.js"; export type { IsoBufferConstructor, IsoBufferEncoding, } from "./buffer.js"; /** * Minimal `Buffer` interface for our usages in the browser or Node.js environments. * * @internal * * @privateRemarks * This type is exported specifically from here to respect combo type+value of same name rules. */ export type IsoBuffer = IsoBufferInterface; /** * Converts a `Uint8Array` to a string of the provided encoding * Useful when the array might be an {@link (IsoBuffer:type)}. * * @param arr - The array to convert. * @param encoding - Optional target encoding; only "utf8" and "base64" are * supported, with "utf8" being default. * @returns The converted string. * * @internal */ export declare function Uint8ArrayToString(arr: Uint8Array, encoding?: IsoBufferEncoding): string; /** * Converts a {@link https://en.wikipedia.org/wiki/Base64 | base64} or * {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8} string to array buffer. * * @param encoding - The input string's encoding. * * @internal */ export declare const stringToBuffer: (input: string, encoding: IsoBufferEncoding) => ArrayBuffer; /** * Convert binary blob to string format * * @param blob - the binary blob * @param encoding - output string's encoding * @returns the blob in string format * * @internal */ export declare const bufferToString: (blob: ArrayBufferLike | Uint8Array, encoding: IsoBufferEncoding) => string; /** * Minimal implementation of `Buffer` for our usages in the browser environment. * * @internal */ export declare const IsoBuffer: IsoBufferConstructor; //# sourceMappingURL=bufferBrowser.d.ts.map