Process byte type tags
346223
def process_byte(self, tag):
        """"""
        tag.set_address(self.normal_register.current_address)
        # each address needs 1 byte
        self.normal_register.move_to_next_address(1)
753314
def cast_bytes(s, encoding=None):
    """"""
    if not isinstance(s, bytes):
        return encode(s, encoding)
    return s
761071
private int[] readFlags(ByteBuffer buf) throws IOException
    {
        ISMatTag tag = new ISMatTag(buf);
        
        int[] flags = tag.readToIntArray();
        
        return flags;
    }
759248
function(bytes) {
  var result = "";
  var i = 0;
  var wc;
  var c;

  while (i < bytes.length) {
    /* parse as UTF-8 lead byte */
    wc = bytes[i++];
    if (wc < 0x80) {
      count = 0;
    } else if (wc < 0xC2 || wc >= 0xF8) {
      throw new Error("input is not a valid UTF-8 lead octet");
    } else if (wc < 0xE0) {
      count = 1;
      wc = (wc & 0x1F) << 6;
    } else if (wc < 0xF0) {
      count = 2;
      wc = (wc & 0x0F) << 12;
    } else /* wc < 0xF8 */ {
      count = 3;
      wc = (wc & 0x07) << 18;
    }

    /* parse trail bytes, if any */
    while (count) {
      if (!(i < bytes.length)) {
        throw new Error("short read");
      }
      if ((c = bytes[i++] ^ 0x80) > 0x3F) {
        throw new Error("input is not a valid UTF-8 trail octet");
      }
      wc |= c << (6 * --count);
      if (wc < (1 << (5 * count + 6))) {
        throw new Error("invalid non-minimal encoded input");
      }
    }

    /* handle conversion to UTF-16 if needed */
    if (wc > 0xFFFF) {
      wc -= 0x10000;
      result += String.fromCharCode(0xD800 + (wc >> 10));
      wc = 0xDC00 + (wc & 0x3FF);
    }
    result += String.fromCharCode(wc);
  }

  return result;
}
296725
function processItemtype(item, processedItems) {
  processedItems.push({
    'id':         md5($(item).html()),
    'name':       $(item).attr('itemtype'),
    'properties': {}
  });

}
577371
def _process_tags(self, tags):
        
        if not tags:
            return []
        return [message.Tag.from_str(x) for x in tags.split(';')]
896073
def _handle_tag_jpegtables(self):
        """"""
        obj = _make_object("JPEGTables")
        assert self._src.read(2) == b'\xFF\xD8'  # SOI marker
        eoimark1 = eoimark2 = None
        allbytes = [b'\xFF\xD8']
        while not (eoimark1 == b'\xFF' and eoimark2 == b'\xD9'):
            newbyte = self._src.read(1)
            allbytes.append(newbyte)
            eoimark1 = eoimark2
            eoimark2 = newbyte

        # concatenate everything, removing the end mark
        obj.JPEGData = b"".join(allbytes[:-2])
        return obj
34877
def process_boolean_array(self, tag):
        """"""
        array_size = tag.get_array_size()
        tag.set_address(self.normal_register.get_array(array_size))
        if self.is_sixteen_bit:
            # each boolean address needs 1/16 byte
            self.normal_register.move_to_next_address((array_size / 16) + 1)
            return
        # each boolean address needs 1/8 byte
        self.normal_register.move_to_next_address((array_size / 8) + 1)
790433
def ConvertToWireFormat(self, value):
    """"""
    data = value.SerializeToString()
    return (self.encoded_tag, VarintEncode(len(data)), data)
1105350
def bytesize(data = {})
      case tags[:type]
      when nil
        (size(data) || 8) / 8
      when :short, :int, :long
        BYTES_IN_STRING.fetch tags[:type]
      when :float
        if tags[:precision] == :double
          BYTES_IN_STRING[:float_double]
        else
          BYTES_IN_STRING[:float_single]
        end
      when :null
        size(data) || 1
      when :string
        size(data)
      else
        0
      end
    end
683873
def process_bind_param(self, value, dialect):
        """"""
        try:
            with BytesIO() as stream:
                with GzipFile(fileobj=stream, mode="wb") as file_handle:
                    file_handle.write(
                        jsonify(value, pretty=False).encode("utf-8")
                    )
                output = stream.getvalue()
            return output
        except TypeError as error:
            log_json_incompatible_types(value)
            raise_with_traceback(error)
17622
function process(content, encoding, attrs, node) {
    if (typeof content === 'undefined') {
      console.error(
        colors.red('process() : Undefined "content" parameters.')
      );
      return '';
    }
    if (!encoding || encoding === 'original') {
      return content;
    }
    var items = encoding.split(/\s*,\s*/);
    if (items.length > 1) {
      items.forEach(function (item) {
        content = process(content, item, attrs, node);
      });
      return content;
    }
    var processor = getProcessor(encoding);
    if (!processor) {
      console.error(
        colors.red('The "%s" processor does not exist.'), encoding
      );
      return content;
    }
    return processor(content, attrs, instance, node);
  }
719063
function processImpliedEndTag(node) {
            var needFix = 0, endParentTagName;    // <ul><li>1<ul><li>2</ul></ul>
            // <ul><li>1<ul><li>2</ul></ul>
            if (endParentTagName = impliedEndTag[node.tagName]) {
                var from = stack.length - 1, parent = stack[from];    // <ol><li><ol><li>
                                                                      // parent ol break li check
                // <ol><li><ol><li>
                // parent ol break li check
                while (parent && !(parent.tagName in endParentTagName)) {
                    // <ul><li>1<div><li>2</div></ul>
                    if (parent.tagName === node.tagName) {
                        needFix = 1;
                        break;
                    }
                    from--;
                    parent = stack[from];
                }
                if (needFix) {
                    closeStackOpenTag(stack.length - 1, from - 1);
                }
            }
            return needFix;
        }
696517
def process_content_type(text)
      content = {}

      field_start = text.index(';')

      content['content-type'] = text[0 ... field_start].strip

      parts = text.split(';')

      parts.each do |part|
        (name, value) = part.gsub(/\"/, '').split('=')

        content[name.strip] = value ? value.strip : value
      end

      content
    end
946939
def process_tag(self, tag_proc_name, tag):
        '''
        '''
        tag_processor = self.tag_procs[tag_proc_name]

        db_entry = (tag_processor.get_name(tag),
                    tag_processor.get_entry_type(tag),
                    tag_processor.get_filename(tag))

        self.zeal_db.insert(*db_entry)

        self.entry_count += 1
694296
function processData(res, data, options) {
  const handlers = Object.assign({}, deserializers, options.deserializers);
  const contentType = res.headers['content-type'];
  const types = typeof contentType === 'string' ? contentType.split(';') : [];

  // if there are no content types, return the data unmodified
  if (!types.length) {
    return data;
  }

  return types.reduce((d, type) => {
    try {
      const t = type.toLocaleLowerCase().trim();
      const handler = handlers[t];

      if (d instanceof Error || typeof handler !== 'function') {
        return d;
      }
      return handler(d);
    } catch (error) {
      return error;
    }
  }, data);
}
1228262
private void processBaseFonts(byte[] data)
   {
      int offset = 0;

      int blockCount = MPPUtility.getShort(data, 0);
      offset += 2;

      int size;
      String name;

      for (int loop = 0; loop < blockCount; loop++)
      {
         /*unknownAttribute = MPPUtility.getShort(data, offset);*/
         offset += 2;

         size = MPPUtility.getShort(data, offset);
         offset += 2;

         name = MPPUtility.getUnicodeString(data, offset);
         offset += 64;

         if (name.length() != 0)
         {
            FontBase fontBase = new FontBase(Integer.valueOf(loop), name, size);
            m_fontBases.put(fontBase.getIndex(), fontBase);
         }
      }
   }