MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / encode

Method encode

src/main/java/fieldnashorn/sourcemap/Base64VLQ.java:87–98  ·  view source on GitHub ↗

Writes a VLQ encoded value to the provide appendable. @throws java.io.IOException

(Appendable out, int value)

Source from the content-addressed store, hash-verified

85 * @throws java.io.IOException
86 */
87 public static void encode(Appendable out, int value)
88 throws IOException {
89 value = toVLQSigned(value);
90 do {
91 int digit = value & VLQ_BASE_MASK;
92 value >>>= VLQ_BASE_SHIFT;
93 if (value > 0) {
94 digit |= VLQ_CONTINUATION_BIT;
95 }
96 out.append(Base64.toBase64(digit));
97 } while (value > 0);
98 }
99
100 /**
101 * Decodes the next VLQValue from the provided CharIterator.

Callers 4

writeEntryMethod · 0.95
diff_toDeltaMethod · 0.80
toStringMethod · 0.80

Calls 3

toVLQSignedMethod · 0.95
toBase64Method · 0.95
appendMethod · 0.45

Tested by

no test coverage detected