shrinkManual method
Compresses this list of unique integers using a specified compression method.
Important: The automatic shrink method is recommended over this manual option in most cases, as it intelligently selects the optimal compression algorithm, which can yield significantly better compression ratios for different data patterns.
Unlike shrink, which automatically selects the best compression algorithm, this method lets you manually choose a specific compression method from the UniqueCompressionMethod enum:
- UniqueCompressionMethod.deltaVarint: Good for sorted lists with small gaps
- UniqueCompressionMethod.runLength: Good for lists with consecutive runs of integers
- UniqueCompressionMethod.chunked: Good for lists with clustered values
- UniqueCompressionMethod.bitmask: Good for dense sets of integers within a limited range
For decompression, use Uint8List.restoreUnique
. or Restore.unique.
Parameters:
method
: The specific compression method to use
Returns a Uint8List containing the compressed integer list.
Implementation
Uint8List shrinkManual(UniqueCompressionMethod method) =>
utils.shrinkUniqueManual(this, method);