Store and retrieve huge binary files in off-chain

+3 votes
Hi,

In Multichain 2.0, when you use the binary cache, you can directly append large binary files and then publish them off-chain from the cache.

However, when you want to retrieve them back, you get a huge HEX string which simply cannot be handled in memory, so how do you convert back to the original binary file?

Thanks!
asked Jan 21, 2019 by emedina

1 Answer

+2 votes
 
Best answer

The gettxoutdata command has optional parameters that allow you to retrieve part of the data only, by providing byte offsets and counts. This lets you retrieve the item's data e.g. 1 MB at a time.

answered Jan 21, 2019 by MultiChain
selected Jan 22, 2019 by emedina
...