@Override public void copy(DataInputView in, DataOutputView target) throws IOException { int len = in.readUnsignedByte(); target.writeByte(len); if (len >= HIGH_BIT) { int shift = 7; int curr; len = len & 0x7f; while ((curr = in.readUnsignedByte()) >= HIGH_BIT) { len |= (curr & 0x7f) << shift; shift += 7; target.writeByte(curr); } len |= curr << shift; } for (int i = 0; i < len; i++) { int c = in.readUnsignedByte(); target.writeByte(c); if (c >= HIGH_BIT) { int curr; while ((curr = in.readUnsignedByte()) >= HIGH_BIT) { target.writeByte(curr); } } } }
@Override public void copy(DataInputView in, DataOutputView target) throws IOException { int len = in.readUnsignedByte(); target.writeByte(len); if (len >= HIGH_BIT) { int shift = 7; int curr; len = len & 0x7f; while ((curr = in.readUnsignedByte()) >= HIGH_BIT) { len |= (curr & 0x7f) << shift; shift += 7; target.writeByte(curr); } len |= curr << shift; } for (int i = 0; i < len; i++) { int c = in.readUnsignedByte(); target.writeByte(c); if (c >= HIGH_BIT) { int curr; while ((curr = in.readUnsignedByte()) >= HIGH_BIT) { target.writeByte(curr); } } } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { int val = source.readUnsignedByte(); target.writeByte(val); if (val >= MAX_BIT) { int shift = 7; int curr; val = val & 0x7f; while ((curr = source.readUnsignedByte()) >= MAX_BIT) { target.writeByte(curr); val |= (curr & 0x7f) << shift; shift += 7; } target.writeByte(curr); val |= curr << shift; } target.write(source, val); };
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { int val = source.readUnsignedByte(); target.writeByte(val); if (val >= MAX_BIT) { int shift = 7; int curr; val = val & 0x7f; while ((curr = source.readUnsignedByte()) >= MAX_BIT) { target.writeByte(curr); val |= (curr & 0x7f) << shift; shift += 7; } target.writeByte(curr); val |= curr << shift; } target.write(source, val); } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { int val = source.readUnsignedByte(); target.writeByte(val); if (val >= MAX_BIT) { int shift = 7; int curr; val = val & 0x7f; while ((curr = source.readUnsignedByte()) >= MAX_BIT) { target.writeByte(curr); val |= (curr & 0x7f) << shift; shift += 7; } target.writeByte(curr); val |= curr << shift; } target.write(source, val); };