import { DataStream } from './DataStream'; import { IEncodable } from '../factory/factories_baseobject'; /** * @method encodeArray * @param arr {Array} the array to encode. * @param stream {DataStream} the stream. * @param encode_element_func {(obj: any, stream: DataStream) => void} The function to encode a single array element. * @param encode_element_func.element {object} * @param encode_element_func.stream {DataStream} the stream. */ export declare function encodeArray(arr: Array, stream: DataStream, encode_element_func?: (obj: any, stream: DataStream) => void): void; /** * @method decodeArray * @param stream {DataStream} the stream. * @param decode_element_func {Function} * The function to decode a single array element. This function returns the element decoded from the stream * @param decode_element_func.stream {DataStream} the stream. */ export declare function decodeArray(stream: DataStream, decode_element_func: (stream: DataStream) => T): T[] | undefined; export declare function cloneArray(arr: any[]): any[]; export declare function cloneComplexArray(arr: any[]): any[]; export declare function concatTypedArrays(arrays: T[]): T; export declare function concatDataViews(views: DataView[]): DataView; export declare function concatArrayBuffers(arrays: ArrayBufferLike[]): ArrayBuffer; export declare function jsonDecodeArray(array: any[] | undefined, decode_element_func: (obj: any) => T): T[]; export declare function jsonEncodeArray(array: any[] | undefined, encode_element_func: (obj: any) => T): T[] | undefined; export declare function jsonDecodeStructArray(array: any[] | undefined, struct: new () => T): T[]; /** * utility function to create a multi dimension array from a flat array * i.e.: to revers a array.flat(n) operation * * 2*3*2 matrix: * [0,1,2,3,4,5,6,7,8,9,10,11] ==> * [[[0,1],[2,3],[4,5]] , [[6,7], [8,9], [10,11]]]; * * @param array a one dimensional array * @param dim array of dimensions i.e. [2,3,2] */ export declare function unFlattenArray(array: any[], dim: number[]): any[]; //# sourceMappingURL=array.d.ts.map