fs2-aws
fs2-aws copied to clipboard
Remove IO.blocking from array copy in S3 client.
-
Also remove the array copy - using
.asByteArrayUnsafe
instead of.asByteArray
to return the original byte array without making a copy of it. FS2 doesn't mutate the byte array afaict, and thisreadFileMultipart
method returns afs2.Stream[F, Byte]
- the caller isn't going to be able to mutate those Bytes. -
Also removed the
Monad.ifM
.ifM(pure(x))(t, f)
is the same asif (x) t else f
. -
Construct the
Chunk
s from byte arrays in a more direct fashion.