**Problem description** Writing events requires a `Vec<u8>`. **Suggestions for an improvement** Make writing events requires `&[u8]` like the byte API.