package compress

import "strconv"

func compress(uncompressed string) string {
	var buf string

	if len(uncompressed) == 0 {
		return buf
	}

	var prev byte
	letter := uncompressed[0]
	last := 0
	for i := 1; i < len(uncompressed); i++ {
		prev = uncompressed[i-1]
		letter = uncompressed[i]
		if letter != prev {
			buf += string(prev)
			buf += strconv.Itoa(i - last)
			last = i
		}
	}
	buf += string(letter)
	buf += strconv.Itoa(len(uncompressed) - last)

	return buf
}

package compress

import "bytes"
import "strconv"

func compress(uncompressed string) string {
	var buf bytes.Buffer

	if len(uncompressed) == 0 {
		return buf.String()
	}

	var prev byte
	letter := uncompressed[0]
	last := 0
	for i := 1; i < len(uncompressed); i++ {
		prev = uncompressed[i-1]
		letter = uncompressed[i]
		if letter != prev {
			buf.WriteByte(prev)
			buf.WriteString(strconv.Itoa(i - last))
			last = i
		}
	}
	buf.WriteByte(letter)
	buf.WriteString(strconv.Itoa(len(uncompressed) - last))

	return buf.String()
}

--- 
+++ 
@@ -1,13 +1,12 @@
 package compress
 
-import "bytes"
 import "strconv"
 
 func compress(uncompressed string) string {
-	var buf bytes.Buffer
+	var buf string
 
 	if len(uncompressed) == 0 {
-		return buf.String()
+		return buf
 	}
 
 	var prev byte
@@ -17,13 +16,13 @@
 		prev = uncompressed[i-1]
 		letter = uncompressed[i]
 		if letter != prev {
-			buf.WriteByte(prev)
-			buf.WriteString(strconv.Itoa(i - last))
+			buf += string(prev)
+			buf += strconv.Itoa(i - last)
 			last = i
 		}
 	}
-	buf.WriteByte(letter)
-	buf.WriteString(strconv.Itoa(len(uncompressed) - last))
+	buf += string(letter)
+	buf += strconv.Itoa(len(uncompressed) - last)
 
-	return buf.String()
+	return buf
 }
Use a string instead of bytes buffer
