code: func puthead(buf []byte, smalltag, largetag byte, size uint64) int {
  	if size < 56 {
  		buf[0] = smalltag + byte(size)
  		return 1
  	}
  	sizesize := putint(buf[1:], size)
  	buf[0] = largetag + byte(sizesize)
  	return sizesize + 1
  }
docs: // puthead writes a list or string header to buf.
  // buf must be at least 9 bytes long.