David PHAM-VAN

Reduce the memory used by PdfStream

@@ -30,7 +30,7 @@ class PdfStream { @@ -30,7 +30,7 @@ class PdfStream {
30 return; 30 return;
31 } 31 }
32 32
33 - final int newSize = math.max(_offset + size + _grow, _offset * 2); 33 + final int newSize = _offset + size + _grow;
34 final Uint8List newBuffer = Uint8List(newSize); 34 final Uint8List newBuffer = Uint8List(newSize);
35 newBuffer.setAll(0, _stream); 35 newBuffer.setAll(0, _stream);
36 _stream = newBuffer; 36 _stream = newBuffer;