Apparently, if you aim to serve the GIF over the internet, you can absolutely avoid creating the file at all. GIFs don't declare how many frames the file has, so the browser will keep loading GIF frames unless you declare that there are no more frames.
People have exploited this to create a hackish one-way websocket [1].