API Reference > bentleyjs-core > Ids > CompressedId64Set > CompressedId64Set.compressArray CompressedId64Set.compressArray Function Give a numerically-ordered array of Id64Strings, produce a compact string representation. Useful when serializing potentially large sets of Ids. Duplicate Ids are included only once in the string representation. compressArray(ids: Id64Array): CompressedId64Set throws Error if two consecutive Ids x and y exist such that the numerical value of x is greater than that of y - i.e., the array is not properly sorted. note The array must be sorted according to the 64-bit numerical value of each Id. note Invalid Ids are ignored. see CompressedId64Set.decompressArray to perform the inverse operation. see OrderedId64Iterable.sortArray to ensure the Ids are properly sorted. see CompressedId64Set.sortAndCompress to compress any unordered collection of Ids. Parameter Type Description ids Id64Array Returns - CompressedId64Set Defined in core/bentley/src/CompressedId64Set.ts Line 76 Last Updated: 11 June, 2024