I have a vhd (disk) of size 500 MB, of which only 10 MB of data is written, followed by empty chunks and finally one more block of 10 MB towards the end.
So , the total data present is just 20 MB out of 500 MB. I am trying to find a utility in node.js , to find out the number of data bytes, not succeeded though.
There is a function fs.fstatSync(file).size, which gives the total size.
Is there any utility/functions to calculate the data written?