code: func torrentOffsetRequest(torrentLength, pieceSize, chunkSize, offset int64) (
  	r request, ok bool) {
  	if offset < 0 || offset >= torrentLength {
  		return
  	}
  	r.Index = pp.Integer(offset / pieceSize)
  	r.Begin = pp.Integer(offset % pieceSize / chunkSize * chunkSize)
  	r.Length = pp.Integer(chunkSize)
  	pieceLeft := pp.Integer(pieceSize - int64(r.Begin))
  	if r.Length > pieceLeft {
  		r.Length = pieceLeft
  	}
  	torrentLeft := torrentLength - int64(r.Index)*pieceSize - int64(r.Begin)
  	if int64(r.Length) > torrentLeft {
  		r.Length = pp.Integer(torrentLeft)
  	}
  	ok = true
  	return
  }
docs: // Return the request that would include the given offset into the torrent data.