Start of decode process. Returns final results.
491874
def decode(self) -> Iterable:
        """"""
        if self.data[0:1] not in (b'd', b'l'):
            return self.__wrap_with_tuple()
        return self.__parse()
1056033
def decode(s, checksum=True):
    """"""
    v, prefix = to_long(
        BASE58_BASE, lambda c: BASE58_LOOKUP[c], s.encode("utf8"))

    data = from_long(v, prefix, 256, lambda x: x)

    if checksum:
        data, the_hash = data[:-4], data[-4:]
        if utils.hash256(data)[:4] == the_hash:
            return data
        raise ValueError("hashed base58 has bad checksum %s" % s)

    return data
1315589
def _readbin(self, length, start):
        """"""
        if not length:
            return ''
        # Get the byte slice containing our bit slice
        startbyte, startoffset = divmod(start + self._offset, 8)
        endbyte = (start + self._offset + length - 1) // 8
        b = self._datastore.getbyteslice(startbyte, endbyte + 1)
        # Convert to a string of '0' and '1's (via a hex string an and int!)
        try:
            c = "{:0{}b}".format(int(binascii.hexlify(b), 16), 8*len(b))
        except TypeError:
            # Hack to get Python 2.6 working
            c = "{0:0{1}b}".format(int(binascii.hexlify(str(b)), 16), 8*len(b))
        # Finally chop off any extra bits.
        return c[startoffset:startoffset + length]
1160598
def decode(buff):
		
		pp = list(map(ord, buff))
		if 0 == len(pp) == 1:
			pp = []
		return pp
934947
def finalize(self):
        
        super(StringWriterConsumer, self).finalize()
        self.result = self.decoder(self.result)
449140
def decode(self, bytes):
        
        opcode  = struct.unpack(">H", bytes[0:2])[0]
        nbytes  = struct.unpack("B",  bytes[2:3])[0]
        name   = None
        args   = []

        if opcode in self.opcodes:
            defn = self.opcodes[opcode]
            name = defn.name
            stop = 3

            for arg in defn.argdefns:
                start = stop
                stop  = start + arg.nbytes
                if arg.fixed:
                    pass  # FIXME: Confirm fixed bytes are as expected?
                else:
                    args.append(arg.decode(bytes[start:stop]))

        return self.create(name, *args)
560021
private Object decodeResult(IoBuffer data) {
        log.debug("decodeResult - data limit: {}", (data != null ? data.limit() : 0));
        processHeaders(data);

        Input input = new Input(data);
        String target = null;

        byte b = data.get();
        //look for SOH
        if (b == 0) {
            log.debug("NUL: {}", b); //0
            log.debug("SOH: {}", data.get()); //1
        } else if (b == 1) {
            log.debug("SOH: {}", b); //1			
        }

        int targetUriLength = data.getShort();
        log.debug("targetUri length: {}", targetUriLength);
        target = input.readString(targetUriLength);

        log.debug("NUL: {}", data.get()); //0

        //should be junk bytes ff, ff, ff, ff
        int count = data.getInt();
        if (count == -1) {
            log.debug("DC1: {}", data.get()); //17
            count = 1;
        } else {
            data.position(data.position() - 4);
            count = data.getShort();
        }

        if (count != 1) {
            throw new RuntimeException("Expected exactly one result but got " + count);
        }

        String[] targetParts = target.split("[/]");
        if (targetParts.length > 1) {
            log.debug("Result sequence number: {}", targetParts[1]);
            target = targetParts[2];
        } else {
            target = target.substring(1);
        }
        log.debug("Target: {}", target);
        if ("onResult".equals(target)) {
            //read return value
            return input.readObject();
        } else if ("onStatus".equals(target)) {
            //read return value
            return input.readObject();
        }
        //read return value
        return Deserializer.deserialize(input, Object.class);
    }
880762
static final int decodeFromBytes(final byte[] arcs, final int start, final int n) {
    int r = 0;
    for (int i = n; --i >= 0;) {
      r = r << 8 | (arcs[start + i] & 0xff);
    }
    return r;
  }
506186
def decode():
    """"""
    logger = logging.getLogger('geobuf')
    stdin = click.get_binary_stream('stdin')
    sink = click.get_text_stream('stdout')
    try:
        pbf = stdin.read()
        data = geobuf.decode(pbf)
        json.dump(data, sink)
        sys.exit(0)
    except Exception:
        logger.exception("Failed. Exception caught")
        sys.exit(1)
1373829
def continuous_decode(self):
    """"""
    for _ in next_checkpoint(self._hparams.model_dir,
                             self._decode_hparams.decode_timeout_mins):
      self.decode()
1361408
def continuous_decode_from_file(self):
    """"""
    for _ in next_checkpoint(self._hparams.model_dir,
                             self._decode_hparams.decode_timeout_mins):
      self.decode(decode_from_file=True)
58473
def decode(self):
        """"""
        # We know the first 2 bytes are the opcode. The second two are the
        # block number.
        (self.blocknumber,) = struct.unpack(str("!H"), self.buffer[2:4])
        log.debug("decoding DAT packet, block number %d", self.blocknumber)
        log.debug("should be %d bytes in the packet total", len(self.buffer))
        # Everything else is data.
        self.data = self.buffer[4:]
        log.debug("found %d bytes of data", len(self.data))
        return self
621275
def decode(self, stream, encoding='utf-8'):
        
        data = stream.read().decode(encoding).strip("\n")
        if data != "":
            logger.debug(('{0}: decoded "{1}" with encoding '
                          '{2}'.format(self.target_address, data, encoding)))
        return data
446965
@Override
    public Step.Result decode(ByteBuffer data, int size, ValueReference<Integer> processed)
    {
        processed.set(0);

        //  In case of zero-copy simply adjust the pointers, no copying
        //  is required. Also, run the state machine in case all the data
        //  were processed.
        if (zeroCopy) {
            assert (size <= toRead);
            readPos.position(readPos.position() + size);
            toRead -= size;
            processed.set(size);

            while (readPos.remaining() == 0) {
                Step.Result result = next.apply();
                if (result != Step.Result.MORE_DATA) {
                    return result;
                }
            }
            return Step.Result.MORE_DATA;
        }

        while (processed.get() < size) {
            //  Copy the data from buffer to the message.
            int toCopy = Math.min(toRead, size - processed.get());
            int limit = data.limit();
            data.limit(data.position() + toCopy);
            readPos.put(data);
            data.limit(limit);
            toRead -= toCopy;
            processed.set(processed.get() + toCopy);

            //  Try to get more space in the message to fill in.
            //  If none is available, return.
            while (readPos.remaining() == 0) {
                Step.Result result = next.apply();
                if (result != Step.Result.MORE_DATA) {
                    return result;
                }
            }
        }

        return Step.Result.MORE_DATA;
    }
388737
def _decode(self):
        

        s = self._encoded_value
        elements = s.replace('~', '').split('!')
        dec_elements = []

        for elem in elements:
            result = []
            idx = 0
            while (idx < len(elem)):
                # Get the idx'th character of s
                c = elem[idx]

                if (c in CPEComponent1_1.NON_STANDARD_VALUES):
                    # Escape character
                    result.append("\\")
                    result.append(c)
                else:
                    # Do nothing
                    result.append(c)

                idx += 1
            dec_elements.append("".join(result))

        self._standard_value = dec_elements
180764
def _readhex(self, length, start):
        """"""
        if length % 4:
            raise InterpretError("Cannot convert to hex unambiguously - "
                                           "not multiple of 4 bits.")
        if not length:
            return ''
        s = self._slice(start, start + length).tobytes()
        try:
            s = s.hex() # Available in Python 3.5
        except AttributeError:
            # This monstrosity is the only thing I could get to work for both 2.6 and 3.1.
            # TODO: Is utf-8 really what we mean here?
            s = str(binascii.hexlify(s).decode('utf-8'))
        # If there's one nibble too many then cut it off
        return s[:-1] if (length // 4) % 2 else s
6576
def bech32_decode(bech):
    """"""
    if ((any(ord(x) < 33 or ord(x) > 126 for x in bech)) or
            (bech.lower() != bech and bech.upper() != bech)):
        return None, None
    bech = bech.lower()
    pos = bech.rfind('1')
    if pos < 1 or pos + 7 > len(bech) or len(bech) > 90:
        return None, None
    if not all(x in CHARSET for x in bech[pos+1:]):
        return None, None
    hrp = bech[:pos]
    data = [CHARSET.find(x) for x in bech[pos+1:]]
    if not bech32_verify_checksum(hrp, data):
        return None, None
    return hrp, data[:-6]