Decodes the information and returns the Diff.

@return Diff

@throws UnsupportedEncodingException
if the character encoding is unsupported
@throws DecodingException
if the decoding failed
187791
public Diff decode()
		throws UnsupportedEncodingException, DecodingException
	{

		int header = r.read(3);
		if (DiffAction.parse(header) != DiffAction.DECODER_DATA) {

			throw new DecodingException("Invalid codecData code: " + header);
		}

		int blockSize_C = 3;
		int blockSize_S = r.read(5);
		int blockSize_E = r.read(5);
		int blockSize_B = r.read(5);
		int blockSize_L = r.read(5);
		r.read(1);

		if (blockSize_S < 0 || blockSize_S > 31) {
			throw new DecodingException("blockSize_S out of range: "
					+ blockSize_S);
		}
		if (blockSize_E < 0 || blockSize_E > 31) {
			throw new DecodingException("blockSize_E out of range: "
					+ blockSize_E);
		}
		if (blockSize_B < 0 || blockSize_B > 31) {
			throw new DecodingException("blockSize_B out of range: "
					+ blockSize_B);
		}
		if (blockSize_L < 0 || blockSize_L > 31) {
			throw new DecodingException("blockSize_L out of range: "
					+ blockSize_L);
		}

		return decode(blockSize_C, blockSize_S, blockSize_E, blockSize_B,
				blockSize_L);
	}
783689
protected function decoded()
	{
		if ($this->json === null) {
			/** @var \Guzzle\Http\Message\Header $contentType */
			$contentType = (string)$this->response->getHeader('content-type');
			if ($contentType === 'application/json')
				$this->json = json_decode($this->response->getBody(true));
		}

		return $this->json;
	}
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
1372262
public static byte[] decode(String s) {
		byte[] bytes;
		try {
			bytes = s.getBytes(PREFERRED_ENCODING);
		} // end try
		catch (java.io.UnsupportedEncodingException uee) {
			bytes = s.getBytes();
		} // end catch

		// Decode
		bytes = decode(bytes);

		return bytes;
	}
196319
public String getString() {
        byte[] rawdata = get();
        String charset = getCharSet();
        if (charset == null) {
            charset = DEFAULT_CHARSET;
        }
        try {
            return new String(rawdata, charset);
        } catch (UnsupportedEncodingException e) {
            return new String(rawdata);
        }
    }
1199291
final byte[] decodeChecked(CharSequence chars) throws DecodingException {
    chars = padding().trimTrailingFrom(chars);
    ByteInput decodedInput = decodingStream(asCharInput(chars));
    byte[] tmp = new byte[maxDecodedSize(chars.length())];
    int index = 0;
    try {
      for (int i = decodedInput.read(); i != -1; i = decodedInput.read()) {
        tmp[index++] = (byte) i;
      }
    } catch (DecodingException badInput) {
      throw badInput;
    } catch (IOException impossible) {
      throw new AssertionError(impossible);
    }
    return extract(tmp, index);
  }
766952
public static String decode(String s) {
        if (s == null) {
            return null;
        }

        int i = s.indexOf('%');
        if (i == -1) {
            return s;
        }

        StringBuilder builder = new StringBuilder();
        int begin = 0;

        do {
            builder.append(s, begin, i);
            begin = i + 3;

            char ch = (char) Integer.parseInt(s.substring(i + 1, begin), 16);

            if ((ch & 0x80) != 0) {
                // Decode "modified UTF-8".

                if (s.charAt(begin++) != '%') {
                    throw new IllegalArgumentException();
                }

                char ch2 = (char) Integer.parseInt(s.substring(begin, begin + 2), 16);
                begin += 2;

                if ((ch & 0xe0) == 0xc0) {
                    ch = (char) (((ch & 0x1f) << 6) | (ch2 & 0x3f));
                } else if ((ch & 0xf0) == 0xe0) {
                    if (s.charAt(begin++) != '%') {
                        throw new IllegalArgumentException();
                    }

                    char ch3 = (char) Integer.parseInt(s.substring(begin, begin + 2), 16);
                    begin += 2;

                    ch = (char) (((ch & 0x0f) << 12) | ((ch2 & 0x3f) << 6) | (ch3 & 0x3f));
                } else {
                    throw new IllegalArgumentException();
                }
            }

            builder.append(ch);
        } while ((i = s.indexOf('%', begin)) != -1);

        builder.append(s, begin, s.length());

        return builder.toString();
    }
847845
protected function characterReference() {
        $ref = $this->decodeCharacterReference();
        if ($ref !== false) {
            $this->buffer($ref);
            return true;
        }
        return false;
    }
1039718
private static String decodeString(ByteBuffer src) throws CharacterCodingException
    {
        // the decoder needs to be reset every time we use it, hence the copy per thread
        CharsetDecoder theDecoder = decoder.get();
        theDecoder.reset();

        final CharBuffer dst = CharBuffer.allocate(
                (int) ((double) src.remaining() * theDecoder.maxCharsPerByte()));

        CoderResult cr = theDecoder.decode(src, dst, true);
        if (!cr.isUnderflow())
            cr.throwException();

        cr = theDecoder.flush(dst);
        if (!cr.isUnderflow())
            cr.throwException();

        return dst.flip().toString();
    }
390239
public function decodeMpint()
    {
        $s = $this->decodeString();
        if ($s === null) {
            return null;
        }

        if ($s === '') {
            return gmp_init(0);
        }

        $n = gmp_init(bin2hex($s), 16);

        // Negative numbers: decode using two-complement.
        if (ord($s[0]) & 0x80) {
            // gmp_com() uses the number's size to compute
            // the complement, which is right in our case.
            $n = gmp_neg(gmp_add(gmp_com($n), "1"));
        }
        return $n;
    }
461914
@Trivial
    @Override
    public String getCharacterEncoding() {
        if (null != this.encoding) {
            return this.encoding;
        }

        EncodingUtils encodingUtils = connection.getEncodingUtils();

        String enc = null;
        // parse content-type to see if it's set there
        String type = this.request.getHeader("Content-Type");
        if (null != type) {
            enc = encodingUtils.getCharsetFromContentType(type);
            if (!encodingUtils.isCharsetSupported(enc)) {
                enc = null;
            }
        }

        // now get the appropriate match (may be set in the properties)
        this.encoding = encodingUtils.getJvmConverter(enc);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getCharacterEncoding: set to " + this.encoding);
        }
        return this.encoding;
    }
830204
public function getDiff()
    {
        $diff = [];

        foreach ($this->getUpdated() as $key) {
            $diff[$key]['old'] = $this->old($key);

            $diff[$key]['new'] = $this->new($key);
        }

        return $diff;
    }
961331
@Override
	public byte[] binaryDiff(final RevisionCodecData codecData, final Diff diff)
		throws UnsupportedEncodingException, EncodingException
	{

		byte[] bData = encode(codecData, diff);
		if (MODE_ZIP_COMPRESSION) {

			Deflater compresser = new Deflater();
			compresser.setInput(bData);
			compresser.finish();

			byte[] output = new byte[1000];
			ByteArrayOutputStream stream = new ByteArrayOutputStream();

			int cLength;
			do {
				cLength = compresser.deflate(output);
				stream.write(output, 0, cLength);
			}
			while (cLength == 1000);

			output = stream.toByteArray();
			if (bData.length + 1 < output.length) {
				return bData;
			}
			else {

				stream = new ByteArrayOutputStream();
				stream.write(new byte[] { -128 }, 0, 1);
				stream.write(output, 0, output.length);

				return stream.toByteArray();
			}
		}

		return bData;
	}
440528
public function getEncodings()
    {
        if (null !== $this->encodings) {
            return $this->encodings;
        }
        $charsets = $this->headers->getParameterListAsObject('ACCEPT_ENCODINGS');

        return $this->encodings = $encodings->getParameterKeys();
    }
1070194
public int decode(byte[] b) throws ParameterException {
        if (b == null || b.length != 1) {
            throw new ParameterException("byte[] must  not be null and length must  be 1");
        }

        this.transimissionMediumRequirement = b[0];

        return 1;
    }
1027605
@Override
    public String decode( String encodedText ) {
        if (encodedText == null) return null;
        if (encodedText.length() < 7) {
            // Not big enough to have an encoded sequence
            return encodedText;
        }
        StringBuilder sb = new StringBuilder();
        char[] digits = new char[4];
        CharacterIterator iter = new StringCharacterIterator(encodedText);
        for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
            if (c == '_') {
                // Read the next character, if there is one ...
                char next = iter.next();
                if (next == CharacterIterator.DONE) {
                    sb.append(c);
                    break;
                }
                // If the next character is not 'x', then these are just regular characters ...
                if (next != 'x') {
                    sb.append(c).append(next);
                    continue;
                }
                // Read the next 4 characters (digits) and another '_' character ...
                digits[0] = iter.next();
                if (digits[0] == CharacterIterator.DONE) {
                    sb.append(c).append(next);
                    break;
                }
                digits[1] = iter.next();
                if (digits[1] == CharacterIterator.DONE) {
                    sb.append(c).append(next).append(digits, 0, 1);
                    break;
                }
                digits[2] = iter.next();
                if (digits[2] == CharacterIterator.DONE) {
                    sb.append(c).append(next).append(digits, 0, 2);
                    break;
                }
                digits[3] = iter.next();
                if (digits[3] == CharacterIterator.DONE) {
                    sb.append(c).append(next).append(digits, 0, 3);
                    break;
                }
                char underscore = iter.next();
                if (underscore != '_') { // includes DONE
                    sb.append(c).append(next).append(digits, 0, 4);
                    if (underscore == CharacterIterator.DONE) break;
                    sb.append(underscore);
                    continue;
                }
                // We've read all 4 digits, including the trailing '_'
                // Now parse into the resulting character
                try {
                    sb.appendCodePoint(Integer.parseInt(new String(digits), 16));
                } catch (NumberFormatException e) {
                    // code was not hexadecimal, so just write out the characters as is ...
                    sb.append(c).append(next).append(digits).append(underscore);
                }
            } else {
                // Just append other characters ...
                sb.append(c);
            }
        }
        return sb.toString();
    }
504687
public function dpEncode() {
        if(count($this->points) > 2) {
            
            $stack[] = array(0, count($this->points)-1);
            
            while(count($stack) > 0) {
                $current = array_pop($stack);
                $maxDist = 0;
                $absMaxDist = 0;
                
                for($i = $current[0]+1; $i < $current[1]; $i++) {
                    $temp = self::distance($this->points[$i], $this->points[$current[0]], $this->points[$current[1]]);
                    if($temp > $maxDist) {
                        $maxDist = $temp;
                        $maxLoc = $i;
                        if($maxDist > $absMaxDist) {
                            $absMaxDist = $maxDist;
                        }
                    }
                }
                
                if($maxDist > $this->verySmall) {
                    $dists[$maxLoc] = $maxDist;
                    array_push($stack, array($current[0], $maxLoc));
                    array_push($stack, array($maxLoc, $current[1]));
                }
            }
        }
    
        $encodedPoints = self::createEncodings($this->points, $dists);
        $encodedLevels = self::encodeLevels($this->points, $dists, $absMaxDist);
        $encodedPointsLiteral = str_replace('\\',"\\\\",$encodedPoints);
        
        $polyline["Points"] = $encodedPoints;
        $polyline["Levels"] = $encodedLevels;
        $polyline["PointsLiteral"] = $encodedPointsLiteral;
        $polyline["ZoomFactor"] = $this->zoomFactor;
        $polyline["NumLevels"] = $this->numLevels;
        
        return $polyline;
    }