MAGIC = bytes([0x51, 0x52, 0x41, 0x31])  # "QRA1"
VERSION = 0x01

FLAG_GZIP = 1 << 0
FLAG_FEC = 1 << 1
PROFILE_SHIFT = 2
PROFILE_MASK = 0b11 << PROFILE_SHIFT
PROFILE_CLASSIC = 0 << PROFILE_SHIFT
PROFILE_CHORD = 1 << PROFILE_SHIFT
PROFILE_CHIME = 2 << PROFILE_SHIFT
PROFILE_SMOOTH = 3 << PROFILE_SHIFT

RS_DATA_LEN = 223
RS_PARITY_LEN = 32
RS_BLOCK_LEN = RS_DATA_LEN + RS_PARITY_LEN
