Yeah I can confirm #1, I tried yesterday to load jpg versions of the same text files, and it was much faster
Not to mention the filesizes, as one of the pic was only 100kb in jpg, and goes above 1mb in it's base64 equivalent :p
I'm mostly concerned about loading times, as saving happens once, only each time there's a new entry
While loading happens every time the app launches, for each of the entries
But yeah to be able to load fast I need to save those in jpg first through the code
And could be interesting to see the difference in saving times for synchronous events indeed
Are you sure they're saving in base64 in the link I posted? <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">
I can't fully understand the code, but what about the "binaryData", and correct "png" extension there?
require("fs").writeFile("out.png", binaryData, "binary", function(err)[/code:104tt3eb]
Ok maybe the first answer looks base64, but how about the second answer "full solution" on that page?
I posted that link coz the docs only have a "utf8" encoding exemple, so it's hard to tell what's possible or not
[url=https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback]https://nodejs.org/api/fs.html#fs_fs_wr ... s_callback[/url]