def codepoints2bitstream(codepoints):
    """
    >>> list(codepoints2bitstream([0x48,0x45]))
    [0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0]
    >>> list(codepoints2bitstream(0x48))
    [0, 0, 0, 1, 0, 0, 1, 0]
    """
    if isinstance(codepoints, int):
        codepoints = [codepoints]
    for codepoint in codepoints:
        bit_string = byte2bit_string(codepoint)
        for bit in bit_string:
            yield int(bit)