Woah, thats a really cool technique i've never seen before. You don't store more than a byte at a time or do any copying, when comparing to the barcode. Awesome to see more C programmers on the forum :)
Unfortunately, the lack of being able to support overlapping sequences could be a big big issue depending on the barcode. For example, this code wouldn't find the barcode "AAC" in the genome "....AAAC....", no matter what came before or after in the genome. This makes it unsuitable for this sort of application -- however, I learnt something new, so still awesome :)
thank you very much to all of you, your response is very helpful.