HomePhabricator

Implement a stream iterator and hashing iterator

Authored by epriestley on Mar 18 2016, 12:00 PM.

Description

Implement a stream iterator and hashing iterator

Summary:
Ref T10604. For Git LFS, we need to compute file hashes as we accept data.

This allows a stream to be wrapped in an iterator, and an iterator to be wrapped in another iterator which does hashing.

This will ultimately let us pump data into Files without needing 100GB of memory to accept a 100GB file.

Test Plan: Added unit test, ran unit test.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10604

Differential Revision: https://secure.phabricator.com/D15491