Skip to content

AlexeyLegasov63/quickserializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickSerializer

Fast and easy to use data serializer. All you need is to create an instance of the class - done. Now you serialize the data.

To serialize your classes, you will need to write a serializer for each of them.

@SerializerObject(signature = 0xA70)
public class Vector2dSerializer implements Serializer<Vector2d> {

	@Override
	public void serialize(SerDataOutputStream data, Vector2d object) {
		data.writeDouble(object.x);
		data.writeDouble(object.y);
	}

	@Override
	public Vector2d deserialize(SerDataInputStream data) {
		var x = data.readDouble();
		var y = data.readDouble();
		return new Vector2d(x, y);
	}

}

If one object fails to load due to an error, it will not affect the following ones, since a sub-buffer is created for loading each object.

About

Quick and simple data serializer written in Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages