1/* 2 * Copyright (c) 2022-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { KPointer } from "../../interop/InteropTypes"; 17import { Wrapper } from "../../interop/Wrapper"; 18import { Access, Exec, ExecWithLength } from "../../interop/arrays"; 19export declare function decodeToString(array: Uint8Array): string; 20export declare function encodeToData(string: string): Uint8Array; 21export declare function withString<R>(data: string | undefined, exec: Exec<number, R>): R; 22export declare function withStringArray<R>(strings: Array<string> | undefined, exec: Exec<number, R>): R; 23export declare function withPtrArray<R>(data: Uint32Array, access: Access, exec: ExecWithLength<number, R>): R; 24export declare function toPtrArray<T extends Wrapper>(data: Array<T | undefined> | undefined): Uint32Array; 25export declare function fromPtrArray<T extends Wrapper>(array: Uint32Array, factory: (ptr: KPointer) => T): Array<T | undefined>; 26export declare function withUint8Array<T>(data: Uint8Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 27export declare function withInt8Array<T>(data: Int8Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 28export declare function withUint16Array<T>(data: Uint16Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 29export declare function withInt16Array<T>(data: Int16Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 30export declare function withUint32Array<T>(data: Uint32Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 31export declare function withInt32Array<T>(data: Int32Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 32export declare function withFloat32Array<T>(data: Float32Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 33export declare function withFloat64Array<T>(data: Float64Array | undefined, access: Access, exec: ExecWithLength<number, T>): T; 34export declare function wasmHeap(): ArrayBuffer; 35//# sourceMappingURL=arrays.d.ts.map