Re: [FileAPI] BlobBuilder.getBlob should clear the BlobBuilder

2011-04-13 Thread Jonas Sicking
On Tue, Apr 12, 2011 at 5:33 PM, Eric Uhrhane er...@google.com wrote: On Tue, Apr 12, 2011 at 3:38 PM, Kyle Huey m...@kylehuey.com wrote: Hello All, In the current FileAPI Writer spec a BlobBuilder can be used to build a series of blobs like so:   var bb = BlobBuilder();   bb.append(foo);

Re: [FileAPI] BlobBuilder.getBlob should clear the BlobBuilder

2011-04-13 Thread Glenn Maynard
On Wed, Apr 13, 2011 at 2:46 AM, Jonas Sicking jo...@sicking.cc wrote: Another advantage of dropping the memory automatically is that you don't need to copy any data into the Blob. Instead you can just make the Blob take ownership of whatever memory buffers you've built up during the various

[FileAPI] BlobBuilder.getBlob should clear the BlobBuilder

2011-04-12 Thread Kyle Huey
Hello All, In the current FileAPI Writer spec a BlobBuilder can be used to build a series of blobs like so: var bb = BlobBuilder(); bb.append(foo); var foo = bb.getBlob(); bb.append(bar); var bar = bb.getBlob(); foo.size; // == 3 bar.size; // == 6 My concern with this pattern is

Re: [FileAPI] BlobBuilder.getBlob should clear the BlobBuilder

2011-04-12 Thread Eric Uhrhane
On Tue, Apr 12, 2011 at 3:38 PM, Kyle Huey m...@kylehuey.com wrote: Hello All, In the current FileAPI Writer spec a BlobBuilder can be used to build a series of blobs like so:   var bb = BlobBuilder();   bb.append(foo);   var foo = bb.getBlob();   bb.append(bar);   var bar =

Re: [FileAPI] BlobBuilder.getBlob should clear the BlobBuilder

2011-04-12 Thread Olli Pettay
On 04/12/2011 05:33 PM, Eric Uhrhane wrote: On Tue, Apr 12, 2011 at 3:38 PM, Kyle Hueym...@kylehuey.com wrote: Hello All, In the current FileAPI Writer spec a BlobBuilder can be used to build a series of blobs like so: var bb = BlobBuilder(); bb.append(foo); var foo = bb.getBlob();