This open source java project does exactly that in the first time screen supposedly for building a searchable, fast and shareable tree of blobs: Link to exact java class (method: BuildTree():)
Repo