What is FS2?
mainFS2 (Functional Streams for Scala) is a library for creating functional, effectful, and concurrent streams. It is designed to handle I/O computations (such as networking and file operations) in constant memory.
Key capabilities include:
- Constant memory I/O: Processing large data streams without exhausting memory.
- Stateful transformations: Applying logic that depends on previous elements in the stream.
- Resource safety: Ensuring effects and resources are evaluated and cleaned up correctly.
- Ecosystem integration: Built on Cats Effect and serves as the streaming engine for libraries like http4s, skunk, and doobie.