Determine whether we should drop dependency on ByteStreams
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
We purposefully avoided com.google.io for Android, which is why IoUtils existed. I'm not sure if anything there has changed, but #5834 started using com.google.io. ByteStreams pulls in a bit more code that would initially be expected and maintaining IoUtils was trivial. There is some potential performance gains (memory usage and CPU) to be had by ByteStreams, because it uses shards that are combined at the end vs one contiguous chunk of ByteArrayInputStream.
From #5834 we see that using ByteStreams added .5K and 14 methods. That's not much, but simultaneously seems a bit much for limited gain.
This came up as ByteStreams.toByteArray was noticed by a Google-internal Android checker for some related code. (cl/272629838)
Contributor guide
Assessment
This issue has not been assessed yet.