code: def _compress(self, inarray, inoffset, n):
      _numsize = self._numsize
      _bitsize = self._bitsize
      _num = self._num
      _bits = self._bits
  
      for key in xrange(_numsize):
          value = key << _bitsize
          num = _num[key] if _num[key] < n else n
          bits = 0
  
          j = 0
          while j < num and inarray[inoffset + j] < (
              1 << _bits[key][j]
          ):
              x = inarray[inoffset + j]
              value |= x << bits
              bits += _bits[key][j]
              j += 1
  
          if j == num:
              return value, num
  
      raise Exception
  
imports: from array import array
  from whoosh.compat import xrange
  from whoosh.system import emptybytes
  from whoosh.system import pack_byte, unpack_byte
  from whoosh.system import pack_ushort_le, unpack_ushort_le
  from whoosh.system import pack_uint_le, unpack_uint_le
label_desc: Use image node_id 2 for calling the Simple16 obj's underlying member method code with example usage: obj._compress(inarray, inoffset, n) and returns: value,  num