Comment #2 on issue 270 by christian.plesner.hansen: Add Blob type to api for holding binary data http://code.google.com/p/v8/issues/detail?id=270
Sounds reasonable. I'd like to keep the int32 operators as well but we might add // Create a Blob with room for 'size' bytes. static Handle<Blob> NewByte(size_t size); size_t ByteCount(); // Read the index'th byte integer byte GetByte(int index); // Write the index'th byte void SetByte(int index, byte value); // Read 'length' bytes into 'buffer', starting from 'start' int ReadBytes(byte *buffer, int start, int length); // Write 'length' bytes from buffer into this Blob int WriteBytes(byte *buffer, int start, int length); Also, the Length method above should be Int32Count or something similar so there's no confusion about how the length is measured. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
