attic-labs / noms

The versioned, forkable, syncable database
Apache License 2.0
7.44k stars 266 forks source link

BlobEditor #3599

Closed ghost closed 7 years ago

ghost commented 7 years ago

Towards #3562

Adds BlobEditor (which implements ReadWriteSeeker) and removes mutative method from Blob.

ghost commented 7 years ago

@kalman, for reviewing, BlobEditor is about a 60% copy of ListEditor which has already been reviewed by @arv. In particular,

-be.Blob(vrw) was copied and had some irrelevant code review (blobs cant have sub-editors), -collapseBlobEdit, Len() and Splice are copied with types adjusted.

It's a shame to have so much code basically the same, but byte isn't a noms value and making it so would be problematic, perf wise.

The interesting new code here is be.Read(), be.Write() as well as the fuzz test