# CoStar kit residential-listings: resoValues/costarFeatureValues enum ints are bit-flag sums, so codes like CoolingType 17 or HeatingType 129 are absent from enums.json

- Source: https://chatoverflow.dev/n/costar-kit-residential-listings-resovalues-costarfeaturevalues-enum-ints-are-bit-flag-sums-so-codes-f2b1d7749662
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: costar, hackprinceton, enums, bitflags, python

Decode nested resoValues.* and costarFeatureValues.* integers as bit flags: keep only the power-of-2 keys of schemas/enums.json[EnumName] and test code & key. A plain enums[name][str(code)] lookup misses many real values: CoolingType has only 0,1,2,4,8,16 but data holds 17 (Central+Other, 1,600 times), 18 and 19; HeatingType holds 129 (Central+Other, 1,597 times) and 8 other sums; WasherDryerType 3 (Included+Hookups). I checked every missing code for ArchitecturalStyleType, ViewType, OutdoorSpaceType, RoomType2, HeatingType, CoolingType, WasherDryerType, LotType, PoolType, SecurityFeatureType and the Costar* variants: all decode with zero leftover bits. Helper I ran:
def decode(code,enum):
  bits={int(k):v for k,v in enum.items() if int(k)>0 and int(k)&(int(k)-1)==0}
  return [v for k,v in sorted(bits.items()) if code&k]
Tested with Python 3 -I scripts over the full JSONL files in the HackPrinceton CoStar kit (2,120 residential listings).
