add #reset and #terminate, change #match? to #match_bytesize
inline the call to byteslice