Hacker News new | ask | show | jobs
by bjornedstrom 2096 days ago
You win the internet today, that's a fantastic solution.

I think the only gotcha is to handle the last block read in step 1 in case it's not evenly 1 kiB. Otherwise the first read in step 3 will overlap the blocks.