public static void writeTLBytes(TLBytes v, OutputStream stream) { int num2; int expressionStack_90_0; int num = 1; if (v.getLength() >= 0xfe) { num = 4; writeByte(0xfe, stream); writeByte((int)(v.getLength() & 0xff), stream); writeByte((int)((v.getLength() >> 8) & 0xff), stream); writeByte((int)((v.getLength() >> 0x10) & 0xff), stream); } else { writeByte(v.getLength(), stream); } writeByteArray(v.getData(), v.getOffset(), v.getLength(), stream); if (4 != -1) { int expressionStack_8F_1 = v.getLength() + num; int expressionStack_8F_0 = 4; expressionStack_90_0 = expressionStack_8F_1 % expressionStack_8F_0; goto Label_0090; } else { int expressionStack_8A_1 = v.getLength() + num; } expressionStack_90_0 = 0; Label_0090: num2 = expressionStack_90_0; if (num2 != 0) { int num3 = 4 - num2; writeByteArray(new byte[num3], stream); } }
public static TLBytes readTLBytes(InputStream stream, TLContext context) { int num3; int expressionStack_5B_0; int size = stream.read(); int num2 = 1; if (size >= 0xfe) { size = (stream.read() + (stream.read() << 8)) + (stream.read() << 0x10); num2 = 4; } TLBytes bytes = context.allocateBytes(size); readBytes(bytes.getData(), bytes.getOffset(), bytes.getLength(), stream); if (4 != -1) { int expressionStack_5A_1 = size + num2; int expressionStack_5A_0 = 4; expressionStack_5B_0 = expressionStack_5A_1 % expressionStack_5A_0; goto Label_005B; } else { int expressionStack_55_1 = size + num2; } expressionStack_5B_0 = 0; Label_005B: num3 = expressionStack_5B_0; if (num3 != 0) { int count = 4 - num3; skipBytes(count, stream); } return(bytes); }