mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-22 01:38:29 +00:00
Trimmed vtables of trailing zeroes.
This is something the format supports, but none of the builders were doing. Can save 10-20% on FlatBuffer binary size! Also fixed the Go tests. Change-Id: I616c56ce9bbcfcaee23aa24f0532fcb60b6a8c75 Tested: on Linux.
This commit is contained in:
@@ -205,11 +205,11 @@ namespace FlatBuffers.Test
|
||||
builder.EndObject();
|
||||
Assert.ArrayEqual(new byte[]
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, // padding to 16 bytes
|
||||
6, 0, // vtable bytes
|
||||
// No padding.
|
||||
4, 0, // vtable bytes
|
||||
4, 0, // end of object from here
|
||||
0, 0, // entry 0 is empty (default value)
|
||||
6, 0, 0, 0, // int32 offset for start of vtable
|
||||
// entry 0 is not stored (trimmed end of vtable)
|
||||
4, 0, 0, 0, // int32 offset for start of vtable
|
||||
},
|
||||
builder.DataBuffer.Data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user