Bug 1035045 - Import google protocol buffer

Use google protocol buffer and add comments for each function.