diff --git a/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart b/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart index 6da979cc..0224edb8 100644 --- a/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart +++ b/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart @@ -18,9 +18,12 @@ final _xmlBytesConverter = /// Extension on byte streams that enable efficient transformations. extension BytesStreamExtension on BytesStream { - /// Returns the all bytes of the stream. + /// Collects all bytes from this stream into one Uint8List. + /// + /// The collector will assume that the bytes in this stream will not change. + /// See [BytesBuilder] for further information. Future get bytes async { - final buffer = BytesBuilder(); + final buffer = BytesBuilder(copy: false); await forEach(buffer.add);