API Reference > bentleyjs-core > Ids > CompressedId64Set > CompressedId64Set.compressIds CompressedId64Set.compressIds Function Give a numerically-ordered collection 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. compressIds(ids: OrderedId64Iterable): 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 collection is not properly sorted. note The collection must be sorted according to the 64-bit numerical value of each Id. note Invalid Ids are ignored. see CompressedId64Set.iterable to perform the inverse operation. see OrderedId64Iterable.sortArray or OrderedId64Iterable.compare to ensure the Ids are properly sorted. see CompressedId64Set.sortAndCompress to compress any unordered collection of Ids. Parameter Type Description ids OrderedId64Iterable Returns - CompressedId64Set Defined in core/bentley/src/CompressedId64Set.ts Line 89 Last Updated: 12 June, 2024