Fill a blob with the contents inside the pointed buffer
pointer to the blob
buffer with the contents for the blob
size of the buffer
0 on success; error code otherwise