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 - iterable to perform the inverse operation.
- sortArray or compare to ensure the Ids are properly sorted.
- sortAndCompress to compress any unordered collection of Ids.
Parameter | Type | Description |
---|---|---|
ids | OrderedId64Iterable |
Returns - CompressedId64Set
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.