# Package-level declarations

## Types

An interface representing a non-blocking semaphore.

Simple wrapper around a channel that provides a context for receiving items in a more flexible manner.

A class representing a concurrency strategy for handling concurrent operations.

A sealed interface representing different strategies for grouping items in a Flow. The GroupStrategy can be used in various contexts to control the way items are grouped together, optimizing the trade-off between latency and throughput.

## Functions

Allows the Flow to be collected and transformed into another Flow concurrently. The transformed Flow is collected asynchronously in the provided coroutineScope. The original flow and the transformed flow share the same buffer with the specified bufferCapacity, onBufferOverflow policy, and onUndeliveredElement handler.

Converts the Flow of ByteBuffer to a Flow of ByteArray.

Converts the Flow of ByteArray to a Flow of ByteBuffer.

Converts the Flow of String to a Flow of ByteBuffer using the specified charset.

The chunked function is used to group the elements emitted by the current Flow into chunks based on the provided GroupStrategy. This can be useful for batch processing or aggregating streams of data more efficiently by combining them into larger pieces.

The chunked function is used to group the elements emitted by the current Flow into fixed-size chunks based on the number of elements. This can be useful for batch processing or aggregating streams of data more efficiently by combining them into larger pieces.

The chunked function is used to group the elements emitted by the current Flow into fixed-size chunks based on a time window. This can be useful for batch processing or aggregating streams of data more efficiently by combining them into larger, more manageable pieces.

Collects the items emitted by this Flow into a ChannelReceiverContext and applies the given block to it.

Collects all the values emitted by the Flow, applying the block function to each value. The processing of items in the flow is concurrent and limited by concurrency level.

Collects all the values emitted by the Flow, applying the block function to each value. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function.

The collectCatching function collects the elements emitted by the current Flow in a suspending way and returns a Result instance that represents the result of the operation.

Creates a Channel with the specified capacity, buffer overflow behavior, and undelivered element handler, and then consumes elements from this channel using the given consumer function.

Completes the Flow early if the specified stopPredicate is met for any element.

Transforms the elements of the iterable concurrently using the provided transform function, and then flattens the result.

Transforms the elements of the iterable concurrently using the provided transform function with a specified concurrency limit, and then flattens the result.

Applies the given transformation function transform to each value of the original Flow and emits the results. The processing of items in the flow is concurrent and limited by concurrency level. Each transformed value is then flattened and emitted individually.

Applies the given transformation function transform to each value of the original Flow and emits the results. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function. Each transformed value is then flattened and emitted individually.

Flattens a Flow of List of ByteBuffer and converts it to a Flow of ByteArray.

Flattens a Flow of Flow items into a Flow of individual items.

Creates a Flow that emits a single item, which is the result of invoking the provided suspending function item.

Creates an infinite Flow that repeatedly emits the provided item.

Joins the elements of the Flow into a single string using the provided f function to transform each element to a string.

Joins the elements of the Flow into a single string, separated by the specified between string, using the provided f function to transform each element to a string.

Transforms the elements of the iterable concurrently using the provided transform function.

Transforms the elements of the iterable concurrently using the provided transform function with a specified concurrency limit.

Applies the given transformation function transform to each value of the original Flow and emits the results. The processing of items in the flow is concurrent and limited by concurrency level.

Applies the given transformation function transform to each value of the original Flow and emits the results. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function.

Applies the given function block to each value of the original Flow and reemits them downstream. The processing of items in the flow is concurrent and limited by concurrency level.

Applies the given function block to each value of the original Flow and reemits them downstream. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function.

Creates a flow that continuously polls elements concurrently by successively applying the f function. The flow stops based on the stopOnEmptyList parameter or when the coroutine context is no longer active. Concurrency is controlled by the concurrency strategy.

The split function is used to group the elements emitted by the current Flow into smaller Flows based on the provided GroupStrategy. This function is useful when smaller Flows are preferred over the original one, some scenarios include file processing, database operations, and so on.

The split function is used to group the elements emitted by the current Flow into smaller Flows based a max number of items. This function is useful when smaller Flows are preferred over the original one, some scenarios include file processing, database operations, and so on.

The split function is used to group the elements emitted by the current Flow into smaller Flows based on size and timeout duration. This function is useful when smaller Flows are preferred over the original one, some scenarios include file processing, database operations, and so on.

Splits and buffers the Flow of String based on the provided delimiter, emitting each piece as a separate element in the resulting Flow.

Creates a Flow with the ability to stop its collection early based on a custom condition.

Sums the elements of this Flow of BigDecimal and returns the result.

Sums the elements of this Flow of BigInteger and returns the result.

Sums the elements of this Flow of Byte and returns the result.

Sums the elements of this Flow of Double and returns the result.

Sums the elements of this Flow of Float and returns the result.

Sums the elements of this Flow of Int and returns the result.

Sums the elements of this Flow of Long and returns the result.

Sums the elements of this Flow of Short and returns the result.

Throttles the emission of elements from the Flow based on the specified semaphore, interval, and strategy.

Throttles the emission of elements from the Flow based on the specified elementsPerInterval, interval, and strategy.

Creates an (almost) infinite Flow that emits sequentially incremented Long numbers starting from the startAt parameter.

Applies the given transformation function transform to each value of the original Flow and emits the results. The processing of items in the flow is concurrent and limited by concurrency level. Each transformed value is then flattened and emitted individually.

Applies the given transformation function transform to each value of the original Flow and emits the results. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function. Each transformed value is then flattened and emitted individually.

Applies the given transformation function transform to each value of the original Flow and emits the results. The processing of items in the flow is concurrent and limited by concurrency level.

Applies the given transformation function transform to each value of the original Flow and emits the results. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function.

Applies the given function block to each value of the original Flow and reemits them downstream. The processing of items in the flow is concurrent and limited by concurrency level.

Applies the given function block to each value of the original Flow and reemits them downstream. The concurrency is managed by an AsyncSemaphore created by the semaphore suspending function.

Function that takes two suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.

Function that takes three suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.

Function that takes four suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.

Function that takes five suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.

Function that takes six suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.

Function that takes seven suspend functions and a zip function as parameters. It executes the suspend functions asynchronously and then applies the zip function to their results.