Let's say we want to print out all the BGP announcements/withdrawal from a single MRT file, either located remotely or locally. Here is an example that does so.
Yes, it is this simple! Give the constructor function an URL or a local file path, and you are able to iterate through all the BGP messages in the file.
It automatically handles retrieving remote file, decompressing content, and reconstructing individual BGP messages from combined MRT data structure.