You are viewing a single comment's thread from:

RE: Dusting off those HIVE muscle memories

in #programming2 years ago

@novacadian I did a bunch of R&D work with storing files on chain. The simplest way that I found to reconstruct the file is to have it be decoded and passed to the browser as a blob URL. You can dig through my other repositories that deal with on chain storage but the following is a good example: https://github.com/txtatech/hive-fc-linux

Sort:  

A sweet tip, @jacobpeacock! Thanks.

You are quite welcome! That gzip plus base64 combo that I use is pretty slick also. It definitely helps keep the base64 strings smaller.

Any saving of resources is helpful. Base64 does not compress very well and image files like jpg are already compressed, so the savings are not as substantial as other data for those reasons.

If memory serves it gzips whatever file it is and then base64 encodes the gzipped data. I did not tinker with image files but it did alright with other media files. I get what you mean though.

The last thing that I was working on was this: https://github.com/txtatech/qr-weaver which takes an input file and turns it into an animated gif of QR codes that can be decoded back to the original file.

Now that would be cool to be able offer QR codes that could summon an image from the blockchain. You have my wheels spinnin'. :)

They can store entire files as an animated gif. I have another project that also makes QR code videos for storing entire files. Pretty neat stuff really.

EDIT: Oh I forgot that qr-weaver project has the video creation in it as well.