serialize method
Implementation
Uint8List serialize() {
var data = serializeData();
final bytesBuilder = BytesBuilder(copy: false);
bytesBuilder
..add(format())
..addByte(asciiHelper.space)
..add(ascii.encode(data.length.toString()))
..addByte(0x0)
..add(data);
//assert(GitHash.compute(result) == hash());
return bytesBuilder.toBytes();
}