Java Utililty Methods Base128

List of utility methods to do Base128

Description

The list of methods to do Base128 are organized into topic(s).

Method

voidencodeBase128(int num, OutputStream os)
encode Base
byte tmp[] = new byte[6];
int i;
for (i = 0; i < 6; i++) {
    tmp[i] = (byte) (num & 0x7f);
    num >>= 7;
    if (num == 0)
        break;
for (int j = i; j >= 0; j--) {
    if (j == 0) {
        os.write(tmp[j]);
    } else {
        os.write(tmp[j] | 0x80);