Changed protobuf serialization to System.arraycopy