code: func (s *storage) fetch(ctx context.Context, br blob.Ref, offset, length int64) (rc io.ReadCloser, size uint32, err error) {
  	meta, err := s.meta(br)
  	if err != nil {
  		return nil, 0, err
  	}
  
  	if meta.file >= len(s.fds) {
  		return nil, 0, fmt.Errorf("diskpacked: attempt to fetch blob from out of range pack file %d > %d", meta.file, len(s.fds))
  	}
  	rac := s.fds[meta.file]
  	var rs io.ReadSeeker
  	if length == -1 {
  		// normal Fetch mode
  		rs = io.NewSectionReader(rac, meta.offset, int64(meta.size))
  	} else {
  		if offset > int64(meta.size) {
  			return nil, 0, blob.ErrOutOfRangeOffsetSubFetch
  		} else if offset+length > int64(meta.size) {
  			length = int64(meta.size) - offset
  		}
  		rs = io.NewSectionReader(rac, meta.offset+offset, length)
  	}
  	fn := rac.Name()
  	// Ensure entry is in map.
  	readVar.Add(fn, 0)
  	if v, ok := readVar.Get(fn).(*expvar.Int); ok {
  		rs = readerutil.NewStatsReadSeeker(v, rs)
  	}
  	readTotVar.Add(s.root, 0)
  	if v, ok := readTotVar.Get(s.root).(*expvar.Int); ok {
  		rs = readerutil.NewStatsReadSeeker(v, rs)
  	}
  	rsc := struct {
  		io.ReadSeeker
  		io.Closer
  	}{
  		rs,
  		types.NopCloser,
  	}
  	return rsc, meta.size, nil
  }
docs: // length of -1 means all