code: func LoadChecksumsFromReader(
  	r io.Reader,
  	weakHashSize int,
  	strongHashSize int,
  ) ([]ChunkChecksum, error) {
  
  	result := make([]ChunkChecksum, 0, 20)
  	offset := uint(0)
  
  	temp := ChunkChecksum{}
  
  	for {
  		weakBuffer := make([]byte, weakHashSize)
  		n, err := io.ReadFull(r, weakBuffer)
  
  		if n == weakHashSize {
  			temp.ChunkOffset = offset
  			temp.WeakChecksum = weakBuffer
  		} else if n == 0 && err == io.EOF {
  			break
  		} else {
  			return nil, ErrPartialChecksum
  		}
  
  		strongBuffer := make([]byte, strongHashSize)
  		n, err = io.ReadFull(r, strongBuffer)
  
  		if n == strongHashSize {
  			temp.StrongChecksum = strongBuffer
  			result = append(result, temp)
  
  			if err == io.EOF {
  				break
  			}
  		} else {
  			return nil, ErrPartialChecksum
  		}
  
  		offset += 1
  	}
  
  	return result, nil
  }
docs: // Loads chunks from a reader, assuming alternating weak then strong hashes