code: func (db *DB) SizeOf(ranges []util.Range) (Sizes, error) {
  	if err := db.ok(); err != nil {
  		return nil, err
  	}
  
  	v := db.s.version()
  	defer v.release()
  
  	sizes := make(Sizes, 0, len(ranges))
  	for _, r := range ranges {
  		imin := makeInternalKey(nil, r.Start, keyMaxSeq, keyTypeSeek)
  		imax := makeInternalKey(nil, r.Limit, keyMaxSeq, keyTypeSeek)
  		start, err := v.offsetOf(imin)
  		if err != nil {
  			return nil, err
  		}
  		limit, err := v.offsetOf(imax)
  		if err != nil {
  			return nil, err
  		}
  		var size int64
  		if limit >= start {
  			size = limit - start
  		}
  		sizes = append(sizes, size)
  	}
  
  	return sizes, nil
  }
docs: // SizeOf calculates approximate sizes of the given key ranges.
  // The length of the returned sizes are equal with the length of the given
  // ranges. The returned sizes measure storage space usage, so if the user
  // data compresses by a factor of ten, the returned sizes will be one-tenth
  // the size of the corresponding user data size.
  // The results may not include the sizes of recently written data.