code: def encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          if len(value) % 8 != 0:
              raise KittyException('this encoder cannot encode bits that are not byte aligned')
          return self._encoder.encode(value.bytesf encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          if len(value) % 8 != 0:
              raise KittyException('this encoder cannot encode bits that are not byte aligned')
          return self._encoder.encode(value.bytes)
docs: :param value: value to encode