Added kseq that accepts a preallocated buffer