Use 'while' instead of 'each' to iterate
Use 'byteslice' instead of '[]' to get substring
Use temporary variable for next index of iteration
test: add test for longer text
test: add a test for getb and putb doing many times
Use 'byteslice' instead of '[]' to get substring
Use 'read' instead of 'getc' to get a byte from StringIO
Add value checks to input values of getb and putb