1.All the chapters of the quran were already written down by the time prophet died.
2.The quran was recorded with different writing material thus helped in compilation.
3.Most of the swahabas who had memorized the the quran acted as the major refrence during compilation.
4.Muslims had continuously recited the quran and thus mastered it.