streaming javascript gif parser