Join Slack
Powered by
hi! is there a way to convert Flow<ByteArray>...
# coroutines
s
Sergey Skaredov
02/15/2021, 3:07 PM
hi! is there a way to convert Flow<ByteArray> to single InputStream, but without storing all emitted bytes in memory?
l
louiscad
02/15/2021, 3:29 PM
I guess with
runBlocking
you can.
s
Sergey Skaredov
02/15/2021, 3:59 PM
thx finally i came to this solution for InputStream to Flow<ByteArray> conversion and vice versa
https://pl.kotl.in/wj0sKaS1Z
u
ursus
02/16/2021, 4:39 AM
Dont you already have it in memory if its Flow<ByteArray> ?
s
Sergey Skaredov
02/16/2021, 6:52 AM
no, bytes will be emitted to flow by the chunks from underlying inputstream
74
Views
Open in Slack
Previous
Next