Deserializing binary data

I have the following structures:

Root:
    int32             nameLength
    byte[nameLength]    name
    int32            numItems
    Item[numItems]        Items

Item:
    int32             itemNameLength
    byte[itemNameLength]    itemName
    int32            VertexLength
    Vertex[ArrayLength]    VertexList

Vertex:
    float    X
    float     Y
    float     z


I am curious, what is the best way to serialize this? Currently I simply read it into a stream and reads one attribute at the time. Coming from a c++ background this feels highly inefficent.
When I try to google the problem I dont get a lot of new results, but I suspect there might be some changes to the language in the last 10 years which have improved tasks like this?
Was this page helpful?