zero-copy encoding