better bit stream support for testing