code: def read_bitpacked_deprecated(file_obj, byte_count, count, width, debug_logging):
      
      raw_bytes = array.array(ARRAY_BYTE_STR, file_obj.read(byte_count)).tolist()
  
      mask = _mask_for_bits(width)
      index = 0
      res = []
      word = 0
      bits_in_word = 0
      while len(res) < count and index <= len(raw_bytes):
          if debug_logging:
              logger.debug("index = %d", index)
              logger.debug("bits in word = %d", bits_in_word)
              logger.debug("word = %s", bin(word))
          if bits_in_word >= width:
              # how many bits over the value is stored
              offset = (bits_in_word - width)
  
              # figure out the value
              value = (word & (mask << offset)) >> offset
              if debug_logging:
                  logger.debug("offset = %d", offset)
                  logger.debug("value = %d (%s)", value, bin(value))
              res.append(value)
  
              bits_in_word -= width
          else:
              word = (word << 8) | raw_bytes[index]
              index += 1
              bits_in_word += 8
      return res
docs: Read `count` values from `fo` using the deprecated bitpacking encoding.