if(lengths[0] > 127) {
      bufferUtils.setInt32(buffer, index, lengths[0]+ 2147483648);
      index += 4;
    }
    else {