Not a great way to go about building a virus scanner...but it is possible, just make sure you go down to the last byte and not measure the size just in kb.
Gl,
D!m