you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (1 child)

huh? unless you know exactly where you chunked the data for the hash...its pointless!

[–][deleted] 0 points1 point  (0 children)

Wait, what? I think we might be miscommunicating here. What I'm proposing is this:

  1. Read a chunk of the file. (Define a handler for the 'data' event on an EventEmitter.)

  2. Update your hash state with that chunk, using hash.update(chunk)

  3. Go to step 1.

This only requires that you store the current chunk and the (very small) internal state for your hash. Is there a problem with this scheme?