JAVAPORT: This should be combined with BitArray in the future, although that class is not yet
dynamically resizeable. This implementation is reasonable but there is a lot of function calling
in loops I'd like to get rid of.
firstname.lastname@example.org (Satoru Takabayashi) - creator, email@example.com (Daniel Switkin) - ported from C++