Remove call to len() and just compare chunk to empty byte string.