Intermediate save for hash matching
This commit is contained in:
parent
15b432c70e
commit
1dcbf8962e
6 changed files with 151 additions and 37 deletions
|
@ -43,7 +43,7 @@ struct UnixFS {
|
|||
enum UnixFSDataType data_type;
|
||||
size_t bytes_size; // the size of the bytes array
|
||||
unsigned char* bytes; // an array of bytes
|
||||
// size_t file_size; // the file size - I mimick this one
|
||||
size_t file_size; // when saving files that have been chunked
|
||||
struct UnixFSBlockSizeNode* block_size_head; // a linked list of block sizes
|
||||
unsigned char* hash; // not saved
|
||||
size_t hash_length; // not saved
|
||||
|
@ -76,6 +76,8 @@ int ipfs_unixfs_free(struct UnixFS* obj);
|
|||
*/
|
||||
int ipfs_unixfs_add_data(unsigned char* data, size_t data_length, struct UnixFS* unix_fs);
|
||||
|
||||
int ipfs_unixfs_add_blocksize(const struct UnixFSBlockSizeNode* blocksize, struct UnixFS* unix_fs);
|
||||
|
||||
/**
|
||||
* Protobuf functions
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue