1. A method, comprising: building a dictionary between an exporter and a collector by encoding a first data record of a flow according to a dictionary template at the exporter and exporting the first data record to the collector via a network communication, wherein the exporter collects information about network packets flowing through a network, formats the information into flow records, and exports the collected information to the collector, each flow record comprising a template record and a data record whose format is indicated by the template record, wherein the dictionary template includes a plurality of fields indicative of the flow; compressing a second data record of the flow using the dictionary, wherein the compressing comprises encoding the second data record according to an encoding template comprising fewer fields than the dictionary template; and exporting the second data record to the collector to be decompressed using the dictionary.