Clone from https://code.google.com/p/freequartz for reading purpose.