Pack the block code for transmission. Returns a 2-3 byte string.

def pack(self):
        """Pack the block code for transmission. Returns a 2-3 byte string."""
        bn, am, sx = self.number, self.access, self.service
        return chr(bool(bn < 256) << 7 | (am & 0x7) << 4 | (sx & 0xf)) + \
            (chr(bn) if bn < 256 else pack("<H", bn))