func (w *Writer) prepareForWrite(t plumbing.ObjectType, size int64) { w.pending = size w.hasher = plumbing.NewHasher(t, size) w.multi = io.MultiWriter(w.zlib, w.hasher) }
func (r *Reader) prepareForRead(t plumbing.ObjectType, size int64) { r.hasher = plumbing.NewHasher(t, size) r.multi = io.TeeReader(r.zlib, r.hasher) }